123456789101112131415161718192021 |
- #include <iostream>
- int main7()
- {
- //1、创建bool数据类型
- bool flag = true;
- std::cout << flag << std::endl;
- flag = false;
- std::cout << flag << std::endl;
- //本质上 1代表真 0代表假
- //2、查看bool类型所占内存空间
- std::cout << "bool类型所占内存空间 " << sizeof(bool) << std::endl;
- system("pause");
- return 0;
- }
|