#include
#include
using namespace std;
class point
{
public:
point(float a,float b) { x=a; y=b; }
float Distance(point &p)
{
float dx=p.x - x;
float dy=p.y - y;
return (float)sqrt(dx*dx+dy*dy);
}
private:
float x,y;
};
void main()
{
point p1(2,3),p2(32,43);
cout<< p1.Distance(p2)<
谢谢你的题目我做完了,很简单的。