Code:
point operator-(point & thePoint1, point & thePoint2)
You need to make the parameters to operator-() const, so that the compiler can allow a temporary variable to be passed as a reference (or not use references, but that's a worse option).


Code:
         return sqrt(pow(x1,2)+pow(x2,2)); //sqrt(x1^2+x2^2)
can I suggest that you use:
Code:
         return sqrt(x1 * x1 + x2 * x2);
It's much faster and at least as readable.

--
Mats