复合类的调用问题
class A{
int i;
public:
A(){i=0;}
void print(){cout<<i<<endl;}
};
class B
{
int i;
public:
B(int x){i=x;}
void print(){cout<<i<<endl;}
};
class C
{
A a;
B b1;
B b2;
float d;
public:
C(int x,int y,float z):b1(x),b2(y)
{d=z;}
void print()
{
如何调用b1的print()函数
}
};