| friends/point-with-operator-friend/point.h - Class Point - header file. | Lecture 4 - slide 36 : 40 Program 1 |
// Class Point of which operator<< is declared as a friend
class Point {
private:
double x, y;
public:
friend std::ostream& operator<<(std::ostream&, const Point&);
Point(double, double);
Point();
double getx () const;
double gety () const;
void move(double, double);
double distance_to(Point);
};