Quote:
Originally Posted by sfx1999
Whistler, I think what he means is that he wants the base class to be able to find out what the derived class is. Like this:
Code:
CBaseClass *instance = new CDerivedClass;
instance.identify();
If you use your method, wouldn't it always return the main class's name?
|
the main class's "GetDescription()" is virtual, so it should return the derived class's name.