Press any key to continue

with the popular cin.get()
and the treacherous system("pause")
you have to press enter to continue. But a while back I found a line that was cin.(something). It would accept any key as 'continue program'. Does anyone know what that was?
closed account (S6k9GNh0)
There is nothing in the standard stream classes that does this. This was most likely part of the IDE that you used. The a viable option is then:

1
2
std::cout << "Press any key to continue..."
std::cin.ignore();
Last edited on
Topic archived. No new replies allowed.