Rectangle() :Point(){} Rectangle(double x,double y) :Point(x,y){}

来源:学生作业帮助网 编辑:作业帮 时间:2024/08/03 10:41:56
Rectangle() :Point(){} Rectangle(double x,double y) :Point(x,y){}
x) JM.IKIT +ЬU@&*T@pu:@6IET0EΆZygËu ]tRXfɎU7y޲>绗?V-ڗ=/.z>ټ }6u֎OYt.N J.y6YR{,lN&d@>[eдC)@`! <;P.ݟ

Rectangle() :Point(){} Rectangle(double x,double y) :Point(x,y){}
Rectangle() :Point(){} Rectangle(double x,double y) :Point(x,y){}

Rectangle() :Point(){} Rectangle(double x,double y) :Point(x,y){}
估计你Rectangle和Point都是一个类,然后Rectangle继承Point
Rectangle类里面的构造函数先调用基类Point类的构造函数,因此写成
Rectangle() : Point(){}
有参构造函数一样道理
Rectangle(double x, double y) : Point(x, y){}