A类继承了B类,在A构造函数时不能A(B m,B #include #include #include class CPoint{public:\x05CPoint(double a,double b){x=a;y=b;}\x05double getx(){return x;}\x05double gety(){return y;}\x05void show()\x05{cout
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/07 22:45:29
A类继承了B类,在A构造函数时不能A(B m,B #include #include #include class CPoint{public:\x05CPoint(double a,double b){x=a;y=b;}\x05double getx(){return x;}\x05double gety(){return y;}\x05void show()\x05{cout
A类继承了B类,在A构造函数时不能A(B m,B
#include
#include
#include
class CPoint
{
public:
\x05CPoint(double a,double b){x=a;y=b;}
\x05double getx(){return x;}
\x05double gety(){return y;}
\x05void show()
\x05{cout
A类继承了B类,在A构造函数时不能A(B m,B #include #include #include class CPoint{public:\x05CPoint(double a,double b){x=a;y=b;}\x05double getx(){return x;}\x05double gety(){return y;}\x05void show()\x05{cout
不能这样构造,应该将构造函数改为 CLine(double x,doubley,double a,doubleb)
{ p1.cpoint(x,y);p2.cpoint(a,b); }