Question:

How do you replace output characters once they are on the screen in Visual C (command-line)?

by Guest59790  |  earlier

0 LIKES UnLike

If I want to make a countdown timer, for instance, and have it display 5, 4, 3, 2, 1 but the 5 replaces the 4 and so on, without modifying the rest of the screen output, how would I go about that? Something like a goto function, but one that goes to a spot on the screen instead of a spot in the code. If anyone has any idea what I'm talking about, please give me a hand... I've been searching for about an hour.

 Tags:

   Report

1 ANSWERS


  1. You can just issue a \r to go back to the start of the line then you can draw it again. You may need to flush the output buffer because sometimes it only gets output when a newline comes along.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.