Back to notes -- Keyboard shortcut: 'u'  previous -- Keyboard shortcut: 'p'  next -- Keyboard shortcut: 'n'  Slide program -- Keyboard shortcut: 't'    Class Point with another overloading of the application operator.Lecture 5 - slide 35 : 39
Program 4
// Another example - another overload of the Point application operator, as applied on int.

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);

  double operator()(int i) const;   // Accesses x or y
};

class IndexProblem{};

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