#include #include class Person { public: std::string name; Person * mother; Person * father; virtual int blah() = 0; }; class Employee : public Person { public: int salary; int f() { return 1; } virtual int blah(); }; int Employee::blah() { return 7; } int main() { Person * p; Employee e; p = &e; p->name = "Antonio"; e.name += " Carzaniga"; std::cout << e.name << std::endl; Employee * ep = dynamic_cast(p); if (ep) { ep->salary = 1000; } }