You are not setting the member variables to any value in your constructor:
Point(double x, double y, double z)
{
}
You need
Point(double x, double y, double z) : x(x), y(y), z(z) {}
This initializes your data members x
, y
, and z
using the constructor initialization list.
You should also remove your copy constructor. The compiler-synthesized one will do just fine.