2

Possible Duplicate:
C/C++: Capture characters from standard input without waiting for enter to be pressed

Is there a way to read standard input continuously? I want to make an X and O game and I want the player to use the the arrows to move its position on the grid. I can't use cin because it requests you to press enter to get the input data into variables. So, does a function or an object doing that exist?

Community
  • 1
  • 1
user1215706
  • 95
  • 2
  • 5

1 Answers1

3

For console (text) applications you'd use something like ncurses, which does terminal 'GUI' controls.

For graphics applications you would use something like SDL which enables event-driven programming.

sehe
  • 350,152
  • 45
  • 431
  • 590