这个程序错在哪了??求大神帮忙改正

#include
#include
using namespace std;
class Point
{
public:
Point(int xx=0,int yy=0)
{
x=xx;
y=yy;

}
Point(Point &p);
int GetX() {return x;}
int GetY() {return y;}
private:
int x,y;
};
Point::Point(Point &p)
{
x=p.x;
y=p.y;
cout<<"实现点的拷贝构造函数"< }
class Line
{
public:
Line()
{
len=0;
cout }
Line(Point &pp1,Point &pp2);
Line(int x1,int y1,int x2,int y2);
Line(Line &l1);
int Getlen() {return len;};
~Line() {}
private:
Point p1,p2;
int len;
};
Line::Line(int x1,int y1,int x2,int y2):p1(x1,y1),p2(x2,y2)
{
cout int x=static_cast(p1.GetX()-p2.GetX());
int y=static_cast(p1.GetY()-p2.GetY());
len=sqrt(x*x+y*y);
}
Line::Line(Line &l1):p1(l1.p1),p2(l1.p2)
{
cout<<"实现线的拷贝构造函数"<<endl;
len=l1.len;
}
int main()
{
Point p1(3,7),p2(9,4);
Line line(p1,p2);
Line line2(line);
cout<<"The length of the line is:";
cout<<line.Getlen()<<endl;
cout<<"The length of the line2 is:";
cout<<line2.Getlen()<<endl;
return 0;
}

len=sqrt(x*x+y*y);
这里sqrt需要double的参数,你是int
len=sqrt((double)x*x+(double)y*y);

你的构造函数初始化有问题

 #include <iostream>
#include <math.h>
using namespace std;

class Point
{
public:
    Point(int xx=0,int yy=0)
    {
        x=xx;
        y=yy;
    }
    Point(Point &p);
    int GetX() {return x;}
    int GetY() {return y;}
private:
    int x,y;
};

Point::Point(Point &p)
{
    x=p.x;
    y=p.y;
    cout<<"实现点的拷贝构造函数"<<endl;
}

class Line
{
public:
    Line()
    {
        len=0;
    }
    Line(Point &pp1,Point &pp2) : p1(pp1), p2(pp2){};
    Line(int x1,int y1,int x2,int y2);
    Line(Line &l1);
    int Getlen() {return len;};
    ~Line() {}
private:
    Point p1,p2;
    int len;
};
Line::Line(int x1,int y1,int x2,int y2):p1(x1,y1),p2(x2,y2)
{
    int x=static_cast<int>(p1.GetX()-p2.GetX());
    int y=static_cast<int>(p1.GetY()-p2.GetY());
    len=sqrt((double)x*x+y*y);
}
Line::Line(Line &l1):p1(l1.p1),p2(l1.p2)
{
    cout<<"实现线的拷贝构造函数"<<endl;
    len=l1.len;
}
int main()
{
    Point p1(3,7),p2(9,4);
    Line line(p1,p2);
    Line line2(line);
    cout<<"The length of the line is:";
    cout<<line.Getlen()<<endl;
    cout<<"The length of the line2 is:";
    cout<<line2.Getlen()<<endl;
    return 0;
}

类型错误的问题,,,类型不匹配