I can never remember how I do this because it comes up so infrequently for me. But in C or C++, what is the best way to read a character from standard input without waiting for a newline (press enter).
Also ideally it wouldn't echo the input character to the screen. I just want to capture keystrokes with out effecting the console screen. @adam - Can you clarify : Do you want to a function that will return immediately if no character is available, or one that will always wait for a single keystroke?
以上就是Capture characters from standard input without waiting for enter to be pressed的详细内容,更多请关注web前端其它相关文章!