#include<iostream>
#include <conio.h>
#include <windows.h>
#include<math.h>
#include<string>
#include<stdlib.h>
using namespace std;
class Point
{
private:
double x,y;
public:
void Init(double xx,double yy)
{
this->x=xx;
this->y=yy;
}
void print()
{
cout<<"x"<<this->x<<"y"<<this->y<<endl;
}
double Distance(const Point &p);
};
double Point::Distance(const Point &p)
{
double dx,dy;
dx=this->x-p.x;
dy=this->y-p.y;
return sqrt(dx*dx+dy*dy);
}
void main()
{
Point a,b;
a.Init(3,4);
b.Init(9,10);
cout<<a.Distance(b);
}
//一年前写的 好多 头文件 没用