Hello,
I have a base class with a private method declared as
virtual bool Initialize() = 0;
My derived class inherits from this base class -privately- (it implements a public interface, as well -- there is no method in the other base class called Initialize).
The derived class supplies bool Initialize() (in the private section -- it also provides a definition). However, the linker tells me "unresolved external" regarding the Initialize in the base class. Any thoughts?
In case it helps, I'll state the problem in its original form. Originally, the base class implemented a default Initialize (ie, the method was of the form 'virtual bool Initialize();' with a trivial definition of return true; ). This method was overridden in my derived class by supplying 'bool Initialize()' and a non-trivial definition. However, I was encountering problems with the class wherein parts of it were not, in fact, being initialized -- stepping through with a debugger revealed that only the base class's Initialize (ie, 'return true;') was being called, not the derived class's. I double-checked -- the actual type is of the derived class. Thoughts?
Thanks!