摘要: //计算两点之间距离#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)< 阅读全文
posted @ 2014-02-08 18:31 玄奘三藏 阅读(361) 评论(0) 推荐(0) 编辑