class Point{
public:
Point(double x=0,double y=0)
:x(x),y(y){
}
void setData(double x0,double y0){
x=x0;
y=y0;
}
double getX(){
return x;
}
double getY(){
return y;
}
double Distance(Point t){
return sqrt((x-t.getX())*(x-t.getX())+(y-t.getY())*(y-t.getY()));
}
~Point(){
}
private:
double x,y;
};
。。。。。。。。。。无语,终于改对了