I am using VC++ 6/Win 98.
I have created an Abstract Class (CScreenObject) which has a number of pure virtual functions.
So far, I have created only one class (CNullObject) which utilises CScreenObject as it's base.
I can compile & link this project without any problems until I attempt to implement serialisation in the Base Class (CScreenObject).
Once I do this I get compiler errors (listed below) which indicate that the Pure Virtual functions have not been overriden in the Child Class.
C:\ScreenSelect\ScreenObjects.cpp(7) : error C2259: 'CScreenObject' : cannot instantiate abstract class due to following members:
c:\screenselect\screenobjects.h(47) : see declaration of 'CScreenObject'
C:\ScreenSelect\ScreenObjects.cpp(7) : warning C4259: 'int __thiscall CScreenObject::Highlight(class CDC *,const class CPoint &)' : pure virtual function was not defined
c:\screenselect\screenobjects.h(58) : see declaration of 'Highlight'
The steps which I took to implement serialisation in the Base Class are as follows:
1. Created a Default Constructor.
2. Added the DECLARE_SERIAL macro in the Class Definition
3. Added the IMPLEMENT)_SERIAL macro in the Implementation File.
4. Create the function Serialize(CArchive& ar) in the Base Class (Virtual Function - not pure).
So my questio is what am I doing to create this error? and what do I do to get rid of it?