开发者

C print text lines and update them

开发者 https://www.devze.com 2023-01-19 08:23 出处:网络
I have a program in C that print a table. I want update the values of this table without reprint the entire table. I can update one line with 开发者_运维问答\\r character, but how I can update more th

I have a program in C that print a table. I want update the values of this table without reprint the entire table. I can update one line with 开发者_运维问答\r character, but how I can update more than one line?


I assume you are talking about outputing the table to stdout which is directed to a console (terminal). There is no standard way of manipulating the terminal in C because its presence it's not even required for standard output to work (it might be very well directed to a file, for example).

There are, however, multi-platform libraries such as ncurses that can operate on a terminal. You might consider using them.

0

精彩评论

暂无评论...
验证码 换一张
取 消