#include using namespace std; class Employee { public: virtual void print() { cout << "I am a mere employee" << endl; } }; class Manager : public Employee { public: void print() { cout << "I am not only an employee, but a manager!" << endl; } }; int main() { Manager *m = new Manager(); Employee *e = m; e->print(); delete m; return 0; }