这个构造函数怎么错了?
#include <iostream>
using namespace std;
class Base{
public:
Base(){}
Base(Base* p):Root(p){}
virtual void* CreateRoot(void* data)=0;
virtual void* CreateLeft(void* data)=0;
virtual void* CreateRight(void* data)=0;
Base* Root;
};
class Example:public Base{
public:
Example(){}
Example(void* ObjTempT=NULL):Left(NULL),Right(NULL),ObjTemp(ObjTempT),Base(NULL){}
Example* Left;
Example* Right;
void* ObjTemp;
};
int main(){
Base* execute = new Example;
Example obj;
return 0;
} |