#include using namespace std; class Complex { public: int r, i; Complex operator+(Complex c) { Complex t; t.r = r + c.r; t.i = i + c.i; return t; } }; int main() { Complex a, b, c; a.r = 2; a.i = 3; b.r = 4; b.i = 5; c = a + b; cout << c.r << " + " << c.i << "i" << endl; return 0; }