高等继续教育 / 面向对象程序设计
正确率:100%
题型描述: 单选题
为了实现两个复数类对象c1,c2相加c1+c2,下面的语句正确的是()
A.Complex operator+(Complex &);
B.class Complex { Complex operator+(Complex &);}
C.class Complex { Complex operator+();}
D.class Complex { Complex operator+(Complex, Complex);}
为了实现两个复数类对象c1,c2相加c1+c2,下面的语句正确的是()
A.Complex operator+(Complex &);
B.class Complex { Complex operator+(Complex &);}
C.class Complex { Complex operator+();}
D.class Complex { Complex operator+(Complex, Complex);}
参考答案: