9.bool类型
2020-12-11 本文已影响0人
lxr_
#include<iostream>
using namespace std;
int main()
{
bool flag = true;
cout << "bool类型占" << sizeof(flag) << "字节" << endl;//bool类型占1个字节
system("pause");
return 0;
}
#include<iostream>
using namespace std;
int main()
{
bool flag = true;
cout << "bool类型占" << sizeof(flag) << "字节" << endl;//bool类型占1个字节
system("pause");
return 0;
}