View Single Post
Re: C++ overriding methods using virtual
Old
  (#3)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default 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.


  
Reply With Quote