How to call method from Base class?

Started by
0 comments, last by fpsgamer 16 years, 4 months ago
Say a base class has a virtual function foo() and another class derived from it wants to override this foo() but wants to do what the base class does first. How do you do this in C++ (like super() in Java)? I know for constructors, it's like this:

Derived::Derived() : Base()
{
...
}
What about for functions?
Advertisement

void Derived::Foo()
{
Base::Foo();
....
}

This topic is closed to new replies.

Advertisement