I am writing a program and one of my classes is called Employee the private variables for Employee class are
string firstName;
string lastName;
I have a child class called StaffEmployee and for its private variables I would like to use
int employeeID;
I want to create an object in int main() called StaffEmployee A; and when you use A.display(); the program should display the firstName lastName and employeeID. However everytime I do this I get an error message saying error C2248: 'Employee::lastName' : cannot access private member declared in class 'Employee'.
If someone could explain to me how to go about fixing this problem it would be awesome! Thanks for your help