| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Need a little help please
I'm new to C++ and am trying to create a clock which updates every second as a win32 console application. I can display the current time in a HH:MM:SS format, but don't know how to make it update.
Can anybody help me? |
|
#2
|
|||
|
|||
|
Quote:
make it loop Code:
#include <winbase.h>
#include <conio.c>
for(;;)
{
//your clock code
Sleep(1000); // sleeps for a second, time is in milliseconds
gotoxy(0,0); //resets the cursor
}
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Need a little help please |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|