Getting a ancestor to save derived class info
I am trying to get an ancestor array to save the info of a derived class. Maybe I am going abou this the wrong way. Here is what I am working on. Person is the base class, employee is the decendant ot Person, and secure is a decendant of Employee. ( Theres more decendants but this is probably enough). Now I have all the function definitions in my code on my PC. My question is I am looking to store the info of Secure( level of access) into an Employee array so i dont need to make more than 1 array. As always, thank you all for any help that you can offer.
a piece of the assignment question:
virtual void InFirstName();
virtual string ReturnFirstName();
virtual void InLastName();
virtual string ReturnLastName();
class Employee:public Person
int IDEmployee; // a nine digit code
class Secure:public Employee
For this assignment, use C++ classes object-oriented design to create a program to help Global Tech Industries track employees and clients. You should create an abstract base class for a person that encompasses the common data of employees and clients, then create classes for employees and clients as descendants. Then, create classes for secure and support employees as descendants of employee. Finally, create structures to store and retrieve employees and clients, and a program that allows the user to interact with these structures.