I'm doing an alarm clock in C++ and am currently working on the program's output. The program will output the alarm time and current time on separate lines, as such:
Your alarm is set for: 12:12 AM
It is currently: 7:08:32 PM
I have the program output once per second to keep track of the current time accurately, however rather than having new lines appear once per second, I was wondering if there would be a way to keep the current time on a single line, and have that line change accordingly to make the program more readable. I'm using cout for this program. Any help would be much appreciated.