/* Rafay Ahmad 23I-2526 */ #include using namespace std; class Complex{ int real; int img; public: Complex(){} Complex(int real, int img) : real(real), img(img){} int getReal(){ return real; } int operator+(Complex c){ Complex res; res.real = real + c.real; res.img = img + c.img; return res.real; } friend ostream& operator<<(ostream&, Complex&); }; int operator+(int a, Complex c){ return a + c.getReal(); } ostream& operator<<(ostream& out, Complex& c){ out<