Constant functions cannot change the object's state. To avoid this we declare the function abs as
abs
double Complex:: abs () const { return sqrt(re*re + im*im); }