主观

写出程序运行结果

#include "stdafx. h"

#include ﹤iostream﹥

using namespace std;

class B;class A

{ public:

A(int i) { a=i; }

friend int F(A &f1, B &f2);

private:

int a;

};

class B

{ public:

B(int i) { b=i; }

friend int F(A &f1, B &f2);

private:

int b;

};

int F(a &f1, B &f2)

{ return(f1. a+f2. b)*(f1. a-f2.b); }

void main( )

{

A n1(10);

B n2(8)

cout﹤﹤F(n1, n2)﹤﹤endl;

 }

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

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服