Can some one tell me how do i display real time in c++. what i mean is that while the program is running you can see the seconds and or minutes counting down like a real clock hanging on the wall
this is what I have:
int main ()
{
time_t rawtime; //creates and object of the built in time function
struct tm * timeinfo; //no idea what this do
time ( &rawtime ); //gets the time from the computer
timeinfo = localtime ( &rawtime ); //store that time here
//it displays current date and time except time is frozen and not real time
cout<< "Current local time and date: "<<asctime (timeinfo)<< endl;
system("pause");
return 0;
}