若为类MyNumber重载运算符“/”,下列声明中,错误的是()。


若为类MyNumber重载运算符“/”,下列声明中,错误的是()。

A.friend MyNumber operator/(int, float)

B.friend MyNumber operator/(float, MyNumber)

C.friend MyNumber operator/(MyNumber, int)

D.friend MyNumber operator/(MyNumber, MyNumber)

正确答案:friend MyNumber operator/(int, float)


Tag:声明 时间:2024-01-15 20:13:42