views:

82

answers:

2

I was wondering how to make a program that can output to every line of the console and not just output a line to be tacked on to the bottom. How can I get control of the whole console like that so I could write console based apps?

+6  A: 

You can use curses or similar library to make that kind of UI - check out GNU ncurses for example.

Wikipedia summarises ncurses nicely

ncurses is a programming library providing an API, allowing the programmer to write text user interfaces in a terminal-independent manner. It's a toolkit for developing "GUI-like" apps which run under a terminal emulator. It also optimizes screen changes, in order to reduce the latency experienced when using remote shells.

To get started, check out the NCURSES Programming HOWTO

Paul Dixon
+2  A: 

You can use the NCURSES library. It provides a comprehensive API for controlling the terminal.

grigy
+1 that is a good link
Paul Dixon