123456789101112
cout<<"Press BACKSPACE to exit...\n"; cout<<"Press ENTER to continue...\n"; cin>>exit; if (exit == '\b') return 0; else if (exit == '\r') goto previous; else cout<<"Invalid Entry\n"; goto next; }
12345678
#include <iostream> #include <limits> void PressEnterToContinue() { std::cout << "Press ENTER to continue... " << flush; std::cin.ignore( std::numeric_limits <std::streamsize> ::max(), '\n' ); }