主观

在下面程序中的横线处填上适当内容,使程序完整

#include﹤iostream.h﹥

_________

class A

{

int i;

public:

int set(B&);

int get( ){return i;}

A(int x){i=x;}

} ;

class B

{

int i;

public:

B(int x){i=x;}

_________ A;

} ;

int A:: set(B&b)

{

return i=b.i;

}

void main( )

{

A a(1);

B b(2);

cout﹤﹤a.get( )﹤﹤",";

a.set(b);

cout﹤﹤a.get( )﹤﹤endl;

}

参考答案
您可能感兴趣的试题
¥

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服