> From: DIAMOND JEFF [mailto:[EMAIL PROTECTED]]
> "Hidden virtual functions" - you didn't include the "virtual" keyword
> in your class so you effectively replaced the virtual function with a
> non-virtual function of same name.

Actually 'virtual'ness is inherited so you can omit it when declaring the
same function in derived classes.  The 'hidden virtual function' problem
happens when a subclass declares a non-virtual function with the same name
but different parameters.  The compiler emits a warning for this (but make
sure to enable it).

> A behaviour I've found unique to Codewarrior involves the "local this
> pointer...", and the effect is that once you are in a function in the
> base class, the "this" pointer is truncated to that base class, so local
> calls to overloaded functions won't call yours.  The work around is to
> redesign your code so that you only call overloaded functions from
> outside the base class entirely.

Huh?  You mean when you try to call a virtual function that has an
implementation in a derived class, then the base version gets called instead
of the derived one?  That would be major compiler breakage which I've never
seen.  Are you sure you got the 'virtual' in the right place (in the base
class) and don't have the hiding problem mentioned above?

-slj-


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to