#ifndef POINT_H #define POINT_H #include //for class ostream using namespace std; class point { double x; double y; public: //Two-argument constructor. point(double initial_x, double initial_y): x {initial_x}, y{initial_y}{} //The "copy constructor". point(const point& another): x {another.x}, y {another.y} {} point& operator=(const point& another) { x = another.x; y = another.y; return *this; } friend ostream& operator<<(ostream& ost, const point& p) { return ost << "(" << p.x << ", " << p.y << ")"; } }; #endif