Character Input Without Delimiter
I'm looking for some way to grab a single character of input where the character is NOT displayed on the screen, and requires no delimiter. I mean, I want the user to press a key (nothing appears on the console), and the character is returned without hitting the enter key or any other delimiter.
I know there's something in conio.h, but it needs to be ANSI Standard as I'm on Linux.
Thanks in advance.
Re: Character Input Without Delimiter
No such thing exists in standard C and standard C++.
Re: Character Input Without Delimiter
For this purpose you can try to use the function _getch() defined in conio.h
Re: Character Input Without Delimiter
Alright, thanks for the replies anyway.
@kakalake
Remember I said "I know there's something in conio.h, but it needs to be ANSI Standard as I'm on Linux."
Re: Character Input Without Delimiter
Check the ncurses library....not sure if that's precisely what you need, but I know it has a lot of similar types of stuff.
Re: Character Input Without Delimiter
Yeah ncurses has what you need. It has a no echo thingy.