64,632
社区成员
发帖
与我相关
我的任务
分享
#include <iostream.h>
class B
{
public:
B();
protected:
private:
};
B::B()
{
cout<<"B is constructed"<<endl;
}
class A
{
public:
A():
protected:
private:
B bbb;
};
A::A()
{
cout<<"A is constructed"<<endl;
}
int main()
{
A aaa;
return 0;
}