Hi All,
I'm having a bit of trouble adding derived objects of CObject to a CObArray object. I get the following error:
error C2243: 'type cast' : conversion from 'DoobyObj *__w64 ' to 'CObject *' exists, but is inaccessible
This is just a test for a later prject (hence the stupid class name). I need the DoobyObj class to inherit from CObject class so that I can serialize the CObArray object.
The error occurs on the Add line:
Can anyone solve my problem??
Thanks,
Donal
I'm having a bit of trouble adding derived objects of CObject to a CObArray object. I get the following error:
error C2243: 'type cast' : conversion from 'DoobyObj *__w64 ' to 'CObject *' exists, but is inaccessible
This is just a test for a later prject (hence the stupid class name). I need the DoobyObj class to inherit from CObject class so that I can serialize the CObArray object.
The error occurs on the Add line:
Code:
void SerObject::addDoobyObject(DoobyObj dO)
{
obaObjects.Add(&dO); //CObArray
resetIndex();
}
Here is the definition of DoobyObj:
class DoobyObj : CObject
{
public:
DECLARE_SERIAL( DoobyObj )
DoobyObj();
void Serialize(CArchive& archive );
CString dooby;
};
Can anyone solve my problem??
Thanks,
Donal