-
12 minute timer
erk... ok.... well I really have no comprehension of time functions in c++
Could someone point me towards or write an example code?
DETAILS:
A clock that starts at 0:00 and goes to 23:99 and then loops
30 secs between 0:00 and 1:00 etc
Major help
-Gone
-
Take a look at the time functions in the header <ctime> (or the C library header <time.h>). Using the functions available in that header, the program you need to write should be pretty straight forward. Have a go, and if you get stuck post your code here for help.
p.s. Do you mean 23:59?
-
I would start with two ints: one to count minutes and one to count seconds.
every second, increase the seconds and do the following:
if (seconds > 59)
reset seconds
increment minutes
else
increment seconds
I'll leave it up to you to use the right timing functions... try starting here: http://www.cppreference.com/stddate.html