Each second add 1 to a counter and output that counter.
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
I sense a disturbance in the ethernet, a sense that the same question has been asked elsewhere
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
Add header time.h and make a loop that gets the current time using time() . You can then test if the time has changed and output it.
By the way, if you are going to use 90% C (and old non-standard C at that) you should just make a C program by converting the cout to printf() and removeiostream
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
> i posted it elsewhere because i didn't know which forum is faster in replying
> and i was really in hurry to get the help
Yes, and that is exactly the message it sends to people who help. It tells us that you've labelled the post as URGENT .
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953