For future reference to anyone who might need this, I have figured it out:
time_t now;
struct tm *current;
now = time(0);
current = localtime(&now);
cout << "hour: " << current->tm_hour <<...
Type: Posts; User: SeeForever
For future reference to anyone who might need this, I have figured it out:
time_t now;
struct tm *current;
now = time(0);
current = localtime(&now);
cout << "hour: " << current->tm_hour <<...
So far I have this as a beta:
time_t now;
struct tm *current;
now = time(0);
current = localtime(&now);
cout << "hour: " << current->tm_hour << endl;
cout << "mins: " << current->tm_min...
I was wondering how to output the current time in C++... Specifically, I'd like to print the time in this format:
02:56:32:231
//where hh:mm:ss:MMM, hh = hours, mm = mins, ss = seconds, MMM =...