Say I have the following classes:
(I left out constructors and destructors as they don't matter here)
class Employee{
public:
virtual void pay()=0;
}
class Worker{
int age;
public:
void pay(){
cout<<"pay worker";
}
void setAge(int a){age=a;}
}
class Manager{
public:
void...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.