void print(ostream& out, Employee& emp) { out << emp << "\n"; } print(cout, *man); // Will print name as Employee not as Manager