On 07 Jul 1999 19:07:50 GMT, Zeos7 <ze...@aol.com> wrote:
That's a freakin' weird place to put an input function.
If all you want is a "press any key to continue" then you
can play with tty mode settings directly (man tcsetattr,
and follow up with the "see also"s), fudge it a little:
system("/sbin/stty cbreak"); c=getchar(); system("/sbin/stty -cbreak");
You can also change your mind and make that a "press ENTER to continue",
or you can use the next suggestion.
Often when you want to have single-character input like this
you're also interested in having control over the screen,
and so you may want to look into the curses library. In
this case, after you've initialized curses, you'll have
a function named (strangely enough) getch() which will
read in one keystroke.