Violeta Ayon
Violeta Ayon

Reputation: 65

Is there a way to print something in console that doesn't scroll down? (In C)

Well, maybe if I offer a little context this will be more understandable.

I want to print "Inventory" in the first line of my main, but I don't want "Inventory" to move from its place, so, while the rest of my commands show in console, and will scroll down, this particular line "Inventory will stay in its place." https://i.sstatic.net/hVItr.png

I'm not sure if this can be done in C

Upvotes: 5

Views: 839

Answers (1)

Cheiron
Cheiron

Reputation: 3736

This is quite hard in plain C due to how the console works.

There is, however a library that has done everything for you: NCurses: http://www.gnu.org/software/ncurses/

Upvotes: 3

Related Questions