Hi guys, uve been workin on a restaurant program and im tryin to write the time to the end of the receipt. so im writing information to a file. only problem is i cannot make my time function return the current time. I've tried everything. can you guys help??
im using:
char Time::currentTime()
{
time_t rawtime;
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
return asctime (timeinfo);
}
and in the other class im usin to write the time:
list_of_orders <<time->currentTime()<<endl;
is this correct