Back to notes -- Keyboard shortcut: 'u'  previous -- Keyboard shortcut: 'p'  next -- Keyboard shortcut: 'n'  Slide program -- Keyboard shortcut: 't'    Class Point with comparison operator friends.Lecture 5 - slide 7 : 39
Program 2
// Preparing for definition of operator< in class Point.

class Point {
private: 
  double x, y;

public:
  Point(double, double);
  Point();
  double getx () const;
  double gety () const;
  void move(double, double);
  double distance_to(Point);

  friend bool operator<(const Point&, const Point&);
};

std::ostream& operator<<(std::ostream&, const Point&);