把Cline 类做如下改变:
class CLine
{
CPoint m_point1;
CPoint m_point2;
public:
CLine(){
}
CLine(int x1,int y1, int x2, int y2):m_point1(x1, y1),m_point2(x2,y2){
}
void ShowLine(){
cout<<"Point1 is:"<
float distance(){
return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * ( y1 - y2));
}
};