Some Hints for Assignment 1 There are two functions needed for you check whether a real number is equal to a complex number. The basic idea is that a complex number z = a+bi is equal to a real number x if and only if a == x and b == 0. If cmplx z; double x; You want to be able to execute the bool operators x == z and z == x. You need separate functions for these. The first of these is a friend function whose declaration is: friend bool operator==(double,const cmplx&); The second is amember function whose declaration is: bool operator==(const cmplx&) const; The definitions of the functions are in the file cmplx.cxx, or cmplx.cpp if you prefer. I'm giving these away. They are: bool cmplx::operator==(double x) const { return rpart == x && ipart == 0; } bool operator==(double x,const cmplx&w) // friend { return w == x; } Notice that the friend function actually calls the member function.