How can I overwrite the same portion of the console in a Windows native C++ console app, without using a 3rd Party library?

前端 未结 5 916
忘了有多久
忘了有多久 2020-12-09 11:31

I have a console app that needs to display the state of items, but rather than having text scroll by like mad I\'d rather see the current status keep showing up on the same

5条回答
  •  醉话见心
    2020-12-09 12:06

    In Linux, you can accomplish this by printing \b and/or \r to stderr. You might need to experiment to find the right combination of things in Windows.

提交回复
热议问题