displaying a variable's value every 30 seconds
-
I've been asked to display a variable's value every 30 seconds on stdout in the same display position on the same line of stdout without advancing the display position. I'm new to C++ and don't know how to begin with this. Please help! :sigh:
To go to the start of the line again, simply output a '\r' char... I see dumb people
-
I've been asked to display a variable's value every 30 seconds on stdout in the same display position on the same line of stdout without advancing the display position. I'm new to C++ and don't know how to begin with this. Please help! :sigh:
if you are in DOS mode you can use gotoxy(x, y) function like gotoxy(24, 12); cout<<"First 30 "; //30 sec delay logic here gotoxy(24, 12); cout<<"Second 30 "; that will output in the same screen coordinate The returned pointer may be temporary and should not be stored for later use.
-
if you are in DOS mode you can use gotoxy(x, y) function like gotoxy(24, 12); cout<<"First 30 "; //30 sec delay logic here gotoxy(24, 12); cout<<"Second 30 "; that will output in the same screen coordinate The returned pointer may be temporary and should not be stored for later use.
-
I've been asked to display a variable's value every 30 seconds on stdout in the same display position on the same line of stdout without advancing the display position. I'm new to C++ and don't know how to begin with this. Please help! :sigh:
why r all ppl saying about '\r' when there is a smart option of '\b'. IT PUTS A BACKSPACE AND TAKES U WHERE U WERE. ...Avenger
Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs