题目
class complex
{
double real; // 实部
double imag; // 虚部
public:
complex(double r,double i):real(r),imag(i){}
complex operator+(complex a)
{
return complex(【 14 】 );
}
};
第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?"-":"+")<<imag<<'i';
}
______;
};
complex& operator -- (complex &c)
{
c.real --;
return c;
}
第2题
第3题
第5题
第6题
第7题
第8题
第9题
第10题
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!