#include <iostream.h>
#include "Complex.h"

Complex& Complex::operator +(Complex& operand)
{
	return *new Complex(this->Re+operand.Re, this->Im+operand.Im);
}


void Complex::afisez()
{
	if (Im>0)
		cout << "\n" << Re << "+"<< Im <<"i";
	else
		cout <<"\n" << Re << Im <<"i";
}

Complex& operator - (Complex& descazut, Complex& scazator)
{
	return *new Complex(descazut.Re-scazator.Re,descazut.Im-scazator.Im);
}

void main()
{
	Complex nr1(4,5), nr2(7,8), nr3;
	nr3=nr1+nr2;
	nr3.afisez();
	nr1=nr1-nr3-nr2;
	nr1.afisez();
	cout <<"\n\n";
}