#include
#include
using namespace std;
class Point
{
double x,y;
public:
Point(double a,double b)
{
x=a;y=b;
}
friend double dis(Point & a,Point & b);
};
double dis(Point & a,Point & b)
{
return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));
}
void main()
{
Point A(3,4), B(3,6);
cout<
class Point
{
public:
Point(int _x=0,int _y=0):x(_x),y(_y) {};
Point(Point &p):x(p.x),y(p.y){};
~Point(){};
int GetX()
{
return x;
}
int GetY()
{
return y;
}
void SetX(int _x)
{
x = _x;
}
void SetY(int _y)
{
y = _y;
}
private:
int x;
int y;
}
class point(int m,int n)
{
public:
int x,y;
setxy(m,n){x=m,y=n}
}
class Point
{
private:
int x;
int y;
public:
void SetX(int _x){x = _x}
void SetY(int _y){y = _y}
};