Re: C++ overriding methods using virtual -
20-06-2004
Pretty difficult to understand other ppls oo coding problems I have to admit
If you have an instance of your superclass, but a pointer to the base class, and the function is defined virtual in the base class, the function of the superclass is called, even if it may not be virtual in the super class. If you wanna explicitly call the one of the base class, you need to add an additional scope or however this operator is called. so pointer->CBotCvar::action would call the base class function.
|