```
#include <iostream>
#include <string>
using namespace std;

class Employee
{
public :
    virtual int calculateSalary()= 0;
    virtual string getName()=0;      
    virtual string getEngineer()=0;            //error
    virtual string getManager()=0;            /error
    virtual string getDirector()=0;              /error

};

class Engineer: public Employee
{
protected:
    string name;
    int salary;
public:
    Engineer(string n,int s):name(n),salary(s){ cout<<endl<<"Engineer    Created"; }
    ~Engineer(){cout<<endl<<"engineer destroyed";}
    int calculateSalary()
    {
        return salary * 2;
    }
    string getName()
    {
        return name;
    }
    string getEngineer()
    {
        return "Engineer";
    }
};

class Manager:public Engineer
{
public:
    Manager(string n,int s): Engineer(n,s) { cout<<endl<<"Manager Created"; }
    ~Manager(){cout<<endl<<"MANAGER destroyed";}
    int calculateSalary()
    {
        return salary * 3;
    }
    string getName()
    {
        return name;
    }
    string getManager()
    {
        return "manager";
    }
};

class Director:public Manager
{
public:
    Director(string n,int s): Manager(n,s) { cout<<endl<<"Director Created"; }
    ~Director(){cout<<endl<<"Director destroyed";}
    int calculateSalary()
    {
        return salary * 4;
    }
    string getName()
    {
        return name;
    }
    string getDirector()
    {
        return "director";
    }
};

int main()
{
    Engineer e1("rohit",20000),e2("soham",21000);
    Manager m1("shyam",23000),m2("ram",23500);
    Director d1("rahul",25000);

    Employee *staff[] = {&e1,&e2,&m1,&m2,&d1};

    for(int i=0;i<5;i++)
    {
        cout<<endl<<"Name : "<<staff[i]->getName() << "\t" << "Salary : " << staff[i]->calculateSalary();
     }

    cout<<endl<<staff[0]->getEngineer();                //error
    cout<<endl<<staff[1]->getEngineer();                //error
    cout<<endl<<staff[2]->getManager();                //error
    cout<<endl<<staff[3]->getManager();                //error
    cout<<endl<<staff[4]->getDirector();                //error

    return 0;
}

```

/*The lines with error are showing errors if i compile this code.
i want to know if it is possible to access the getEngineer(),getManager(),getDirector() via the staff pointer.
If yes, then how?
If not, then why? 
and is there any alternative to access those functions keeping the data type of staff as it is(i.e Employee) ?*/