#include using namespace std ; class Person { public: string firstName ; string lastName ; virtual void getName() { cout << firstName << " " << lastName << endl ; } }; class Employee : public Person { public: string jobTitle ; //virtual void getName() { cout << firstName << " " << lastName << " " << jobTitle << endl ; } }; int main() { Person* p1 ; Employee* e1 ; e1 = new Employee() ; e1->firstName = "Chuck" ; e1->lastName = "Wepner" ; e1->jobTitle = "Boxer" ; p1 = e1 ; p1->getName() ; delete e1 ; return 0 ; }