Dekti
Dekti

Reputation: 1

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 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.

Upvotes: 0

Views: 336

Answers (2)

Robᵩ
Robᵩ

Reputation: 168626

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

Upvotes: 0

Ned Batchelder
Ned Batchelder

Reputation: 375574

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

Upvotes: 6

Related Questions