if (!cin) { cin.clear(); while (cin.get() != ' ') continue; cout << "Bad input; input process terminated. "; break; }