完成下列程序,使得该程序输出结果如下:
7,8
4,5
6
#include <iostream.h>
class B
{
public:
B(int i,int j)
{
b1=i;
b2=j;
}
void Print( )
{
cout<<b1<<','<<b2<<endl;
}
private:
int b1,b2;
};
class A
{
public:
1
void Print( )
{
2
cout<<a<<endl;
}
private:
B b;
int a;
};
void main( )
{
B b(7,8);
b.Print( );
A a(4,5,6);
a.Print( );
}