TomChapman
2011-12-31 18:08:51 UTC
Lets say I have a base class called "MyBaseClass". I derive a class from
that base class called "MyDerivedClass".
In a function of the derived class I sometime write a function call
formatted like this:
MyBaseClass::SomeFunction(a parameter list goes here);
I specifically include the base class name, MyBaseClass, so that the
base class's version of the function is called instead of a similarly
named derived class function.
QUESTION: Is there a different notation (or maybe a "best practice")
that I can use where I don't need to specify the actual base class name.
Some notation that says "use the base class version of this function
from whatever class happens to be the base class"?
that base class called "MyDerivedClass".
In a function of the derived class I sometime write a function call
formatted like this:
MyBaseClass::SomeFunction(a parameter list goes here);
I specifically include the base class name, MyBaseClass, so that the
base class's version of the function is called instead of a similarly
named derived class function.
QUESTION: Is there a different notation (or maybe a "best practice")
that I can use where I don't need to specify the actual base class name.
Some notation that says "use the base class version of this function
from whatever class happens to be the base class"?