When I compile my project in C ++, MSVC produces the following error:
error No. 94: array size must be greater than zero
The error occurs on the following line when executing sizeof:
if (sizeof (MyNamespace::MyClass) == 60)
MyClass is defined this way:
class MyClass: public ParentClass { public: MyClass( void *pCreate, int a, int b, bool c) : ParentClass( pCreate, a, b, c ) {} virtual inline void myFunc ( ) {
Can someone tell me what could be wrong? Even if sizeof returns zero size, why is this a compiler error?
source share