class TeachingAssistant : public Employee { ~TeachingAssistant(); }; TeachingAssistant::~TeachingAssistant() { cout << "Goodbye TeachingAssistant\n"; }
Now consider the following:
Employee *a = new TeachingAssistant(); delete a;