收起
Point类没有无参构造函数,而你创建p1要调用它。 改成: Point p1(3,4); 或者为类加一个无参构造函数 Point::Point() { X=Y=0; } 同时在类内加上声明: Point();
报告相同问题?