Pioz
Pioz

Reputation: 6321

C print text lines and update them

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?

Upvotes: 0

Views: 369

Answers (1)

Xion
Xion

Reputation: 22770

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.

Upvotes: 4

Related Questions