【简答题】下面是复数类complex的定义,其中重载的运算符"+"的功能是返回一个新的复数对象,其实部等于两个操作对象实部之和,其虚部等于两个操作对象虚部之和;请补充完整: class complex { double real ; //实部 double imag ; //虚部 public : complex(double r ,double i):real(r),imag(i){} complex o...
【简答题】下面是复数类complex的定义,其中作为友元函数重载的运算符“--”的功能是将参数对象的实部减1,然后返回对该对象的引用;请补充完整。 class complex { private: int real; int imag; public: complex(int r=0,int i=0):real(r),imag(i){} void show () { cout<<real<<(imag<0?...
【单选题】There are several ways in which Americans 【B1】 customs are different from those in other parts of the world. A guest invited to dinner is 【B2】 to arrive on time. The use of the knife and fork is often...