0

Sorry for the nubbish question , but I'm wondering which function will do the trick-read a char from keyboard without need to press "Enter"???

5
Contributors
4
Replies
6
Views
10 Years
Discussion Span
Last Post by Salem
0

getchar and getche functions just read a character, they serve no purpose in detecting when a key was pressed. You need to look into the kbhit function which detects keypresses and then read the character using getchar .

Read this. but mind you that the function is highly platform and compiler dependent.

0

> but I'm wondering which function will do the trick-read a char from keyboard without need to press "Enter"
Yes there is, but not without you saying which OS / Compiler / application type (console, GUI etc) you're trying to write.

There isn't a standard "one way works for everyone" answer to this question.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.