摘要:
//计算两点之间距离#include#includeusing namespace std;class Point;class test{public: double dist(Point &p1,Point &p2);};class Point{private: int x,y;public: Point(int xx=0,int yy=0) { x=xx; y=yy; } void display() { cout"; p2.display(); test a; cout<<"距离:"<<a.dist(p1,p2)< 阅读全文