Qualifying the method name with the name of the base class.
void SomeMethod(inputs) { ... do stuff .. base::SomeMethod(inputs); }
Online Demo:
#include<iostream> class Base { public: virtual void doSomething() { std::cout<<"In Base"; } }; class Derived:public Base { public: virtual void doSomething() { std::cout<<"In Derived"; Base::doSomething(); } }; int main() { Base *ptr = new Derived; ptr->doSomething(); return 0; }
source share