hi, i'm trying to get the value from a variable in a class to storage in a inherited class. some reason(my lack knowledge) the input is 0. any hints? thanks
Usually a child class is more descriptive that a parent. For example a parent class could be Pizza and a child could be ThreeMeatPizza or DeepDishPizza. You might also want to look at the CPolygon example here: http://www.cplusplus.com/doc/tutorial/inheritance/
Basically what I am wanting to say is that it looks like you are not using inheritance the way it is meant to be used. You have variables that are already in the parent class also located in the child class. And in my opinion DateType is not a more descriptive form of a Patient. Something like ChildPatient or OldPatient would be a better child candidate.
http://www.cplusplus.com/doc/tutorial/inheritance/
I suggest you re-read the above document for a better understanding of inheritance. Basically, since dateType publicly inherits from patient, a dateType object will have the fields dAdmited, dDischarg, and pDOB with the values you entered.
Also, why is setAllDate() virtual? Are you planning on having subclasses inheriting from the dateType class?
As well, setAllDate should probably take in an argument. I'm assuming you want to pass your dateType object some dates.