// modify boolalpha flag #include <iostream> // std::cout, std::boolalpha, std::noboolalpha int main () { bool b = true; std::cout << std::boolalpha << b << ' '; std::cout << std::noboolalpha << b << ' '; return 0; }