www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - g++ in UNIX: changing cursor position

↑ ↓ ← "CY" <lcy hkem.com> writes:
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!
Feb 24 2002
↑ ↓ → Richard Johnson <rich REMOVETHISBITnorthernsky.uklinux.net> writes:
"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.
Feb 25 2002