How to overwrite stdout in C

后端 未结 8 899
清歌不尽
清歌不尽 2020-12-07 18:13

In most modern shells, you can hit the up and down arrows and it will put, at the prompt, previous commands that you have executed. My question is, how does this work?!

8条回答
  •  离开以前
    2020-12-07 18:17

    In addition to \r and \b, take a look at ncurses for some advanced control over what's on the console screen. (Including columns, moving around arbitrarily, etc).

提交回复
热议问题