February 25, 2002
How can I program to move the cursor to a specific position, change text color or console background color, if I compile the code using g++ in UNIX, just like doing so by including windows.h and use functions like SetConsoleCursorPosition" and "SetConsoleTextAttribute" in VC++?

Thanks!


February 25, 2002
"CY" <lcy@hkem.com> wrote in news:a5cocp$152o$1@digitaldaemon.com:

> How can I program to move the cursor to a specific position, change text color or console background color, if I compile the code using g++ in UNIX, just like doing so by including windows.h and use functions like SetConsoleCursorPosition" and "SetConsoleTextAttribute" in VC++?
> 
> Thanks!
> 
> 
> 

You'll probably need to make use of the curses library which provides these sorts of functions under Unix. It's usually a case of including curses.h or ncurses.h - curses is the traditional library under unix, ncurses is a modern free clone of the curses library which you often get distributed with linux.

Richard.