How do I call the parent function from a derived class using C++? For example, I have a class called parent, and a class called child which is deri
parent
child
If your base class is called Base, and your function is called FooBar() you can call it directly using Base::FooBar()
Base
FooBar()
Base::FooBar()
void Base::FooBar() { printf("in Base\n"); } void ChildOfBase::FooBar() { Base::FooBar(); }