c++题目,有大佬吗?
class Point
{
double X,Y;
public:
Point(double a=0,double b=0);
double GetX();
double GetY();
friend double GetLength(Point &A,Point &B);
};
在main()中定义线段的两个端点,输出端点的位置,利用友元计算并输出线段的长度。
c++题目,有大佬吗?
class Point
{
double X,Y;
public:
Point(double a=0,double b=0);
double GetX();
double GetY();
friend double GetLength(Point &A,Point &B);
};
在main()中定义线段的两个端点,输出端点的位置,利用友元计算并输出线段的长度。