Inputing Data w/o Pressing Enter

Is there any way to allow the user to input a single character/int without requiring them to press enter in order to continue with the program?
Yes, but they're all nonstandard. You can use platform specific APIs or you can get a crossplatform lib like ncurses.

Although -- you typically should not do this in a console program. Why do you want to do it?
I made a black jack game but it just seems repetitive hitting enter after each player hits/stands. I'd like it to where after the user enter's 'h' for hit or 's' for stand, it goes immediately to the next option.
Correction -- they are all standard; they are also platform-specific.

The C and C++ standards don't address device issues (like tty terminals). Each OS/platform has its own specific way of handling it.

NCurses +1
(links to get started with curses)
http://www.cplusplus.com/forum/windows/15935/#msg79025
Rather than install NCurses, I would get a lib for making games, since you want to make a game.

Obligatory link: http://cplusplus.com/forum/articles/28558/
Topic archived. No new replies allowed.