Programming classes

If we define a function to compute the absolute value of complex variable like

double Complex:: abs ()  { return sqrt(re*re + im*im);}

without the constant declaration and define thereafter a function myabs as

double myabs (const Complex& c)
{ return c.abs(); }   // Not ok because c.abs() is not a const func.

the compiler would not allow the c.abs() call in myabs since Complex::abs is not a constant member function.