You are viewing a single comment's thread. Return to all comments →
Complex operator+(Complex &l, Complex &r) { Complex t; t.a = l.a + r.a; t.b = l.b + r.b; return t; }
ostream& operator << (ostream &outS, Complex in){ outS << in.a << "+i"<< in.b << endl; return outS; }
Seems like cookies are disabled on this browser, please enable them to open this website
Overload Operators
You are viewing a single comment's thread. Return to all comments →
Complex operator+(Complex &l, Complex &r) { Complex t; t.a = l.a + r.a; t.b = l.b + r.b; return t; }
ostream& operator << (ostream &outS, Complex in){ outS << in.a << "+i"<< in.b << endl; return outS; }