Programming classes

Let us study the declarations in our complex class. In our main function we have a statement like d = b;, which means that we call d.operator= (b) and we have defined a so-called assignment operator as a part of the class defined as

Complex& Complex:: operator= (const Complex& c)
{
   re = c.re;
   im = c.im;
   return *this;
}