instance analysis:
#include <iostream>
using namespace std;
struct Comp
{
float real;
float image;
};
Comp operator+(Comp one, Comp another)
{
one.real += another.real;
one.image += another.image;
return one;
}
int main()
{
Comp c1 = {1,2};
Comp c2 = {3,4};
Comp sum = c1+c2; //operator+(c1,c2);
cout<<sum.real<<" "<<sum.image<<endl;
return 0;
}