#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;
}

输出结果:

true
false
1
0

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
  • 2021-12-18
  • 2021-05-29
  • 2021-12-31
猜你喜欢
  • 2021-07-21
  • 2021-09-09
  • 2021-06-19
  • 2021-11-08
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案