// 2D point - without const and reference args // #include #include using namespace std; class Point { private: double x, y; public: Point(double xx, double yy) { x = xx; y = yy; } void print(const char msg[]) { cout << msg << ": (" << x << "," << y << ")" << endl; } static double distance( Point p, Point q) { double dx = p.x - q.x, dy = p.y - q.y; return sqrt(dx*dx+dy*dy); } };