struct tm * timeinfo; time ( &rawtime ); timeinfo = localtime ( &rawtime ); cout<<"The Check in time is : " <<asctime (timeinfo); ofstream customerfile ("customers.txt", ios::out | ios::app ); string day; string month; string date; cout<<"Please fill the check out time data :"<<endl; cout<<"The Day of check out : \n"; cin>>day; cout<<"The Month of check out : \n"; cin>>month; cout<<"The Date of check out : \n"; cin>>date; string chkout = day + month + date + (asctime (timeinfo)+10); if (customerfile.is_open()) { customerfile<< asctime (timeinfo)<<","<< chkout<<"\n";} customerfile.close(); system ("pause"); goto Main_Menu; break; }
mktime
tm
difftime
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)