Oct 4, 2015 at 1:32pm UTC
I have a project. The problem is make a timer. When the user hit enter key, the program will display a lap. Help anyone ðŸ˜
I'm a beginner.
I have my timer but don't know how to display the laps.
this is my timer:
int a,b,c,d;
for (a=0;a<=59;a++){
for (b=0;b<=59;b++){
for (c=0;c<=59;c++){
for (d=0;d<=59;d++){
cout<<a<<":"<<b<<":"<<c<<":"<<d;}}}}
help please.
Oct 4, 2015 at 2:34pm UTC
Please don't make duplicate posts for the same problem.
What's the problem anyway?
Oct 5, 2015 at 12:40am UTC
I don't know how to display laps whenever ENTER key is pressed.
Oct 5, 2015 at 4:01am UTC
Does it apply with my timer?
Oct 5, 2015 at 4:07am UTC
I'm having an error with (nullptr)
Oct 5, 2015 at 4:13am UTC
LOL i'm sorry but you got the wrong idea.
Oct 5, 2015 at 4:31am UTC
So what is the correct idea that you are chasing? The solution above is one of many possibilities and is often machine dependant so that's why you need Dr Google.
This site has an article on it if you like to surf around here.
Oct 5, 2015 at 4:42am UTC
It's not about the intervals of the key press. its the elapsed time in the timer.
The timer is running. and when you press the enter it will display a time within the timer in a lap.
the timer is on the top.