最佳答案
可能的复制品:
C + + : 一个空类的对象的大小是多少
为什么下面的输出 1
?
#include <iostream>
class Test
{
};
int main()
{
std::cout << sizeof(Test);
return 0;
}