C++_bool

时间:2023-03-09 13:03:19
C++_bool

1 0

 #include <iostream>
using namespace std; void main()
{
bool bl = && || || - && ; std::cout << bl << std::endl;// std::cout << typeid(bl).name() << std::endl;//bool,获取变量bl的数据类型 decltype (bl) newbl( + * - && + || -);//根据变量bl,创建一个相同类型的新变量newbl std::cout << newbl << std::endl;// system("pause");
}