In order to test bool i/o, I tried to run this short program:
#include int main() { while(true) { bool f; if (std::cin >> f) std
Try to use following combo:
cin.ignore(INT_MAX, '\n'); // ignore all characters in the current line cin.clear(); // restore 'good' flag
Using only cin.ignore() will discard only one character in the buffer.
cin.ignore()