#include <iostream> // std::cout, std::boolalpha, std::noboolalpha int main () { bool b = true; std::cout << std::boolalpha; std::cout << b << std::endl; std::cout << false << std::endl; std::cout << std::noboolalpha; std::cout << b << std::endl; std::cout << false << std::endl; }
輸出結果:ios
true false 1 0