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
Add this line after clearing cin:
std::cin.ignore();
This way, the stream ignores whatever is left on its buffer.