This doesn't work:
string temp; cout << "Press Enter to Continue"; cin >> temp;
cout << "Press Enter to Continue"; cin.ignore();
or, better:
#include <limits> cout << "Press Enter to Continue"; cin.ignore(std::numeric_limits<streamsize>::max(),' ');
2.1m questions
2.1m answers
60 comments
57.0k users