e-6-1-f.txt
来自「最后声明」· 文本 代码 · 共 33 行
TXT
33 行
// E-6-1-f.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <iostream>
using namespace std;
class A{
friend class B;
void friend sq(A a,B b);
int r;
public:
A(int x){
r=x*x; }
};
class B{
void friend sq(A a,B b);
int r;
public:
B(int x){
r=x*x;}
};
void sq(A a,B b){
cout<<"狗日的平方差是"<<a.r-b.r<<endl;
}
void main(){
A c(34);
B e(22);
sq(c,e);
system("pause");
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?