1

any idea on how to implement a "press any key to move on" in c++?

Based on my understanding, for any input stream function, it all requires users to hit "enter" to read.

But how do I make it like “whenever a key is being hit, it moves on to the next stage without hitting the enter key?"

By the way, the working station is Linux

Thanks a lot

john.k.doe
  • 7,533
  • 2
  • 37
  • 64
user1819047
  • 667
  • 9
  • 18

1 Answers1

3

This is not possible in standard C++, since its OS specific. On Linux you can use Curses and getch in a loop until you get a character. Or you can simply use "Press enter to continue"

http://linux.die.net/man/3/getch

Wildex999
  • 162
  • 10