Re: C++ overriding methods using virtual -
22-06-2004
In your original post, you said...
" gBotGlobals.m_CurrentHandledCvar is a "CBotCvar*" variable."
Which means you are declaring pointers to the base class and then trying to call virtual functions from the derived class (which won't happen without you doing some run-time dynamic casting on the pointer).
Why didn't you just make 'm_CurrentHandledCvar' a pointer to 'CBotMenuCommand' instead of a pointer to the base class?
|