题目内容:
有类定义如下:气 class Type { public: Type (int i=0); Tvpe operator -(int); friend Type operator + (Type, Type ); private: int val; 若有对象定义Type cl;则下列语句序列中,错误的是
A.Type(3)+c1;
B.cl+Type(3);
C.3-cl;
D.c1-3;
参考答案:
有类定义如下:气 class Type { public: Type (int i=0); Tvpe operator -(int); friend Type operator + (Type, Type ); private: int val; 若有对象定义Type cl;则下列语句序列中,错误的是
A.Type(3)+c1;
B.cl+Type(3);
C.3-cl;
D.c1-3;