#include#include using namespace std; class Base { public: Base(){} ~Base(){} public: virtual void f1(int x){ cout << "baseclass: f1() " << x << endl; } virtual void f2()final{ cout << "baseclass: f2() " << endl; } void f3(int x){ cout << "baseclass : f3() " < f1(1); pBase->f2(); pBase->f3(3); cout << endl; Derive* pDerive = new Derive(); pDerive->f1(2.0); pDerive->f1(2); //pDerive->f2(); pDerive->f3(3); cout << endl; return 0; }