ch2_friendfunction.cpp

来自「data+structures+using+c的源码」· C++ 代码 · 共 26 行

CPP
26 行
字号
//Friend Function Illustration

#include <iostream>
#include "classIllusFriend.h"

using namespace std;

int main()
{	
	classIllusFriend aObject;					//Line 11

	aObject.setx(32);							//Line 12

	cout<<"Line 13: aObject.x: ";				//Line 13
	aObject.print();							//Line 14
	cout<<endl;									//Line 15
	cout<<"*~*~*~*~*~* Testing friendFunc "
	    <<"*~*~*~*~*~*"<<endl<<endl;		    //Line 16

	friendFunc(aObject);						//Line 17

	return 0;
}


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?