From: Jason Siemens (jason.siemens@canrem.com)
Date: 08/16/93


Subject: Ncurses, how do I...
From: jason.siemens@canrem.com (Jason Siemens)
Date: Mon, 16 Aug 1993 18:49:00 -0400


-> I am trying to do some C programming under Linux. I am having
-> trouble with a particular routine I am pretty sure it's in the
-> ncurses library. What am I trying to do is the following.
->
-> Print some text, then have the user input *1* character of
-> information. getchar() only works if you hit carriage return. I want
-> the user to just hit one key on the keyboard and then have that
-> keystroke returned to the calling part of the program. Sort of like
-> an inkey function in BASIC.
->
-> My C is a little rusty, so please email me with any info to help
-> solve this problem. I am also then interested to see what command
-> syntax I need to use to cc (what -l options do I need to use?)
->
-> Thanks,
-> Fozzie

Try :
 int key;
 while (!kbhit()) {};
 key = getch();

I not sure whether you have kbhit() and getch() but there should be some
other similiar functions. I am using Borland C++ 3.1 for DOS but these
functions are usually standard. I have them in STDIO.H and CONIO.H.

Hope this helps,

Jason Siemens.
jason.siemens@canrem.com