Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 为什么标准本身没有将 sizeof(bool) 定义为一个?
我已经sizeof(bool)在几个系统上进行了测试,我总是发现1(与 相同sizeof(char))。什么是最广泛使用的系统/c++ 编译器,其中sizeof(bool)严格高于1?
sizeof(bool)
1
sizeof(char)