请教各位,在下面的代码中如何得到实例化的类啊?
// TestClass010.cpp : Defines the entry point for the console application.//
#include "stdafx.h"
#include "iostream.h"
class BaseClass
{
public:
BaseClass();
virtual ~BaseClass();
virtual char GetCC() const = 0;
};
class ABaseClass
{
public:
ABaseClass();
virtual ~ABaseClass();
char GetCC()
{
return 'C';
}
};
class OtherClass
{
public:
OtherClass();
virtual ~OtherClass();
BaseClass const * current_object() const
{
return m_current_object;
}
private:
BaseClass * m_current_object;
};
int main(int argc, char* argv[])
{
//OtherClass cc;
//cout<<cc.current_object()->GetCC()<<endl;
//怎么在这里添加上行的处理
return 0;
}