// An object of type Complex is a complex number. It has
// a real part (repart) and an imaginary part (impart).
struct Complex
{
double repart, impart;
};
// sum(a,b,c) sets c = a + b.
void sum(const Complex& a, const Complex& b, Complex& c)
{
c.repart = a.repart + b.repart;
c.impart = a.impart + b.impart;
}