我收到了这个奇怪的错误,我无法解决。
class BaseClass
{
public:BaseClass(const char* aHow = NULL)
{
std::strcpy(ivHow,aHow);
}
char ivHow[512];
};
class DerivedClass : public BaseClass
{
DerivedClass (const char* dcHow):BaseClass (dcHow){}
};
我收到以下错误:
../trunk/inc/Sample.h: In constructor ‘DerivedClass::DerivedClass(const char*)’:
../trunk/inc/Sample.h: error: expected identifier before ‘public’
../trunk/inc/Sample.h: error: expected ‘{’ before ‘public’