CClassBase{
public:
void FunctionBase;
CClassDerived *m_pVble; // define a pointer to an object of the Derived class
};
CClassDerived{
void FunctionDerived;
};
void CClassBase::FunctionBase{
nVble=m_pVble->Vble; // pointer to vble of the derived class. is ok?
}
void CClassDerived::FunctionDerived{
Wstring Vble;
Vble = getInfoString();
}
@coder777 i think you need to add 'class' keyword before 'CClassBase' though.
1 2 3 4 5 6
class CClassDerived; // Note: forward declaration
class CClassBase{///addition of class here
public:
void FunctionBase(); // Note: ()
CClassDerived *m_pVble;
};