Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C on Linux How To???

Status
Not open for further replies.

ANINDRA

Technical User
Joined
Nov 25, 2001
Messages
1
Location
IN
On windows based C/C++ we use the following functions:

clrscr() -- to clear the screen
getch()
getche()

But in C on Linux I am not able to use the above functions. I am including the "conio.h" header file for clrscr() function to be used. It is not even finding the header file. Is there any other way round to do the same?
 
Clearing the screen is terminal dependent, but you can always depend on curses to send the proper sequence for whatever terminal you are on. See "man werase". "man tputs"

For the others, see man getc which should include getchar, fgetc etc. Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
Hi,

If you are talking about the 'console' screen then you would use the ncurses library which is functionally similar to the unix curses library. See the howto -->
However, if you mean gui coding for gnome or kde thats altogether different of course...

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top