J**********y 发帖数: 1891 | 1 class A
{
public:
int a;
};
class B
{
public:
int a;
B(int aa=0)
{
a=aa;
}
~B(){};
};
class C: public A, public B
{
//public:
// C(int cc):B(cc)
// {
// };
};
int _tmain(int argc, _TCHAR* argv[])
{
char aa[100]="0123456789";
cout << sizeof(func()) << endl;
cout << sizeof(int) << endl;
cout << sizeof(A) << endl;
cout << sizeof(B) << endl;
cout << sizeof(C) << endl;
A a;
B b;
C c;
cout << a.a << endl;
cout << b.a << endl;
cout << c.A::a << endl;
cout << c.B::a << endl;
return 0;
} | a***y 发帖数: 2803 | 2 compiler上跑一下就知道了啊.
【在 J**********y 的大作中提到】 : class A : { : public: : int a; : }; : class B : { : public: : int a; : B(int aa=0)
|
|