请用各种编译器测试,结果?
#include <iostream>
class EmptyClass
{
typedef int Int; //typedef members does not make a class nonempty
};
class EmptyTwo : public EmptyClass {};
class EmptyThree : public EmptyClass, public EmptyTwo {};
int main()
{
std::cout << "The size of Empty Class is : " << sizeof(EmptyClass) << std::endl;
std::cout << "The size of Empty Class is : " << sizeof(EmptyTwo) << std::endl;
std::cout << "The size of Empty Class is : " << sizeof(EmptyThree) << std::endl;
return 0;
}