#include <iostream>
using namespace std;
class A
{
private:
int a;
public:
A()
{
cout << "A"<<endl;
}
class B
{
private:
int b;
public:
B()
{
cout << "B" <<endl;
}
};
};
class C : public A
{
private:
int c;
public:
C()
{
cout << "C" <<endl;
}
};
void main()
{
C c;
cout << sizeof(C) <<endl;
cout << sizeof(A) <<endl;
}
猜猜输出啥?
A
C
8
4
请按任意键继续. . .