Command Prompt for Windows




getch, getwch, gettch

int getch(void);
int getwch(void);
int gettch(void);

Get a character from the keyboard

Returns

A character value.

Comments

Function getch(), getwch() and gettch() read characters from the keyboard, and as a result is not streamable.

Characters read are not echoed to the screen.

There is no character mapping. (ie. '\r' is NOT mapped to '\n');

See Also

scanf, putch, getchar, putchar