In my book, C++ Primer Plus 4th Edition, it says that cin.get(buf, 80) will set the failbit and block further reading if it encounters an emtpy line (just a newline in the stream).
So in order to use cin again, you should use cin.clear(). Why doesn't this simple code work then (it should wait for the user to enter something at the end):
It works if I add cin.ignore(), but there shouldn't be anything left in the stream since I read the trailing newline with cin.get(buf, 80)?
using namespace std;
cout << "Enter an integer: ";
cin >> i;
cout << "You entered: " << i << endl;
cin.get(buf, 80); // Just an example, I know you can use cin.get() here.