#include<iostream>//定义一个点类point 并定义成员函数double DiStance(const&Point) 求两点之间的距离
#include<string>
using namespace std;
class point
{
private:
double start;
double end;
double Point;
public:
point(double start,double end)
{
this->start=start;
this->end=end;
}
double DiStance(point const &Point)
{
cout<<end-start<<endl;
}
};
int main()
{
double a,b,c;
cin>>a>>b;
point distance(a,b);
distance.DiStance(distance);
return 0;
}
09-12
367
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)