base class initialization
The last class doesn't compile.
Any suggestion ?
I've tried both
CDerivedEx( int x, CString s, int a ) : CDerived( s, a ) : CBase( a )
and
CDerivedEx( int x, CString s, int a ) : CDerived( s, a ) , CBase( a )
Both gets error! ??
class CBase
{
CBase( int a ){;};
CBase( CString s ){;};
~CBase(){;};
};
class CDerived : public CBase
{
CDerived( CString s, int a ) : CBase( s ) {;}; //with string
~CDerived( ){;};
};
class CDerivedEx : public CDerived
{
CDerivedEx( int x, CString s, int a ) : CDerived( s, a ) : CBase( a ){;}; // with int
~CDerivedEx{;};
};