• 2022-06-26 问题

    下列哪一项是对两个复数相加的加法运算符重载的正确形式?_______________ A: Complexoperator+(constComplex&c1,constComplex&c2) B: Complexoperator+(constComplex&c) C: Complexoperator(constComplex&c1,constComplex&c2) D: Complexoperator(+)(constComplex&c)

    下列哪一项是对两个复数相加的加法运算符重载的正确形式?_______________ A: Complexoperator+(constComplex&c1,constComplex&c2) B: Complexoperator+(constComplex&c) C: Complexoperator(constComplex&c1,constComplex&c2) D: Complexoperator(+)(constComplex&c)

  • 2022-06-26 问题

    设有复数类COMPLEX,在复数类中重载乘法运算符。下列哪项是运算符重载的正确的声明格式? A: COMPLEX*(COMPLEXc1,COMPLEXc2); B: COMPLEX*(COMPLEXc2); C: COMPLEXoperator*(COMPLEXc1,COMPLEXc2); D: COMPLEXoperator*(COMPLEXc2);

    设有复数类COMPLEX,在复数类中重载乘法运算符。下列哪项是运算符重载的正确的声明格式? A: COMPLEX*(COMPLEXc1,COMPLEXc2); B: COMPLEX*(COMPLEXc2); C: COMPLEXoperator*(COMPLEXc1,COMPLEXc2); D: COMPLEXoperator*(COMPLEXc2);

  • 1