I have used the following to acquire the date from the computer and this works great.
char*date;
string reg_date = " ";
time_t todayIs = time(0); //generate a time element
date = ctime(&todayIs); //get the current date and time
reg_date = _strdate(date); //express the date in the form mm/dd/yy
My program asks for the user to input his/her date of birth. After this line the age should be calculated using the date of birth and the date extracted from the computer.
I have tried different things and I have had no luck what so ever. I would greatly appreciate any help that can be offered.