adding inheritance

I've created a "customer" class and a "staff" class.

On the main menu, you choose weather you'd like to add information to the "customer" or "staff" class.

My question is, how on earth can I add inheritance into this?
Do they have any common members?
I suppose you could write a class human_being that would have a virtual void give_information(), and that would be the parent class of customer and staff.
Not sure what the virtual void thing does.

Need to research the code for inheritance but first I need to think what I'm going to use.

these are my members so far

 
Staff(char rank[], char annualWage[], float hours);


 
Customer(char name[], char gender[], int phone, char pcode[], float dob);


So if I made a human_being class then made staff and customer inherit from there. Customer could have like card number, amount of loyalty points and erm out of ideas now lol
well,
1
2
3
class human_being{/*nothing here*/};
class customer : public human_being{/*members*/};
class staff : public human_being{/*other members*/};

is still inheritance..

As for virtual functions see http://www.cplusplus.com/doc/tutorial/polymorphism/
But if you don't know it, don't use it.
Topic archived. No new replies allowed.