Hi,
How can you invoke a superclass's method from within the subclass
method that is overriding it?
For example, say that in the Car class we have a method like:
Car::turnOn() {
startEngine();
illuminateDashboard()
//other stuff
}
Now we want to specialize this method for a Corvette, which also flips
up its headlights when turned on. I'd like to do:
Corvette::turnOn() {
flipUpHeadlights();
super.turnOn()
}
But I know C++ does not support the super keyword like that. What is
the correct way to handle this situation?
Thanks,
cpp