Hi,
Can any one please let me know where I am going wrong??I am trying this for past 2 hrs ,but .......
the problem is accept the date of Birth seprately dd,mm yyyy
but the age should be btw 15 to 70 yrs on 31/12/2001. if its outside the range error message should be displayed.....Again there it should check whether its a leap yr or not......
Though i havent given a thought about a leap yr ......pls give me hints what should I do??
Thanks
Code:cout << "Input Year : "; aYear = readLine(); year= atoi(aYear.c_str()); if(year>1900 || year <2002) { validAge(year); //function cout<<"Age not within range"<<endl; cout<<"data not added not database"<<endl; } void validAge(const int aYear) { const int mini= 1986; const int max= 1931; if (aYear>mini) { cout<<" too young"<<endl; } else if(aYear<max ) { cout<<"too young"<<endl; } }