Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Getch, whats the equivalent
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
wonderboy
n00b
n00b


Joined: 20 Jun 2003
Posts: 71

PostPosted: Mon Jun 30, 2003 11:56 pm    Post subject: Getch, whats the equivalent Reply with quote

I just started programming on linux, what is the equivalent for getch(), getche() and anything else that was in conio.h for DOS programming
Back to top
View user's profile Send private message
Brandy
Bodhisattva
Bodhisattva


Joined: 08 Jun 2003
Posts: 820
Location: New Zealand

PostPosted: Tue Jul 01, 2003 1:50 am    Post subject: Reply with quote

Hi wonderboy.

conio.h is not a part of the ANSI standard and so does not appear on Linux.

ANSI I/O functions can be found in the stdio.h library: fgetc, fgets, getc, getchar, gets, ungetc are the functions to handle the input of characters and strings. There is a thread here that gives a nice example of using getchar.

Interestingly, getch() does exist in the ncurses.h library.

Ciao, Brandy
_________________
Faber est suae quisque fortunae.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum