Calling base class definition of virtual member function with function pointer
问题 I want to call the base class implementation of a virtual function using a member function pointer. class Base { public: virtual void func() { cout << "base" << endl; } }; class Derived: public Base { public: void func() { cout << "derived" << endl; } void callFunc() { void (Base::*fp)() = &Base::func; (this->*fp)(); // Derived::func will be called. // In my application I store the pointer for later use, // so I can't simply do Base::func(). } }; In the code above the derived class