/* FILE: boolalpha.cpp Examples of I/O stream manipulators for Boolean values WARNING: input of textual representation of true and false is currently not supported. Manipulators that don't take an arg (endl, flush, ...) are declared in Manipulators that do take an arg (setw(), setprecision(), ...) are declared in */ int main(){ bool bvar; cout << true << ' ' << false << endl; cout << boolalpha; cout << true << ' ' << false << endl; // cout << noboolalpha; cout << true << ' ' << false << endl; cout << "enter bool val: " ; cin >> bvar; if(cin){ cout << endl << "cin = true " << endl; cout << "bvar = " << bvar << endl; } else{ cout << endl << "cin = false " << endl; cout << "bvar = " << bvar << endl; } return 0; }