开发者

How to keep the terminal from scrolling

I am writing a simple program in C++ to be run in a terminal window. I would like the output text to be locked in position on the screen. Instead of each new line appearing at the bottom of the screen and pushing everything up, I would like to be able to change a line of text or开发者_JAVA百科 some characters in a line of text, while keeping other lines above and below it static. I know I have seen this done in terminal, and I believe it was done with C++, but I can't find any documentation on it. I cannot even think of what this type of display might be called. My google fu has failed me; please help. If you can tell me what commands/library to use, that would be great, but even being able to tell me what commands accomplish this in a programming language other than C++ would give me more to go on than I have now.


You want ncurses, a library for displaying text on a terminal.


If you are programming for Microsoft Windows, try googling for Win32 Console Functions.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜