文件名称:li
介绍说明--下载内容均来自于网络,请自行研究使用
普通函数作友元:声明普通函数distance用来计算两点距离,定义一个Circle类,两圆心的距离用普通函数distance来计算。这个函数需要访问Circle类的私有数据x和y,为此,将distance声明为Circle类的友元函数。主函数如下定义:-Common function for friend: Statement used to calculate the normal function of distance from two points define a Circle class, the distance between two center distance is calculated using an ordinary function. This function needs access to the Circle class private data x and y, this would distance the Circle class declaration for the friend function. The main function defined as follows:
(系统自动生成,下载前可以参看下载内容)
下载文件列表
li\1.txt
li
li