Helo guys
i) 班级配电
我确实是操作员超负荷工作。
Complex c = a + b; // where a and b are object of Complex class
基本上为经营者+(Complex&);
但我知道,例如,如何说
double c = a + 10; //where a is object of Complex class but 10 is integer / double
我的确界定了翻一番的播种,因为我的国际民主和选举援助学会说,太多的歌剧+,它有些抱怨无法“理解”+。
它必须采用这一格式,通过<代码>double c =+ 10;。
感谢
错误信息
Error: more than one operator "+" matches these operands:
error C2666: Rational::operator + : 3 overloads have similar conversions
1> could be const Complex Complex::operator +(const Complex &) 1>
or double operator +(const Complex &,double)
the compiler can not pick based on signature ? and yes I did define it outside the class because I had one defined inside the class 感谢