Lecture 6 - Slide 21 : 40
Function objects

A function object (or function-like object or functor) is an object for which an application operator, operator(), has been defined

A function object can be called - pretending that it is a function

point.h
Class Point with overloadings of the application operator.
point.cc
Definition of funny Point application operators.
prog.cc
Sample uses of the application operators - Funny and artificial.
As another example, we provide access to x and y in point p via p(1) and p(2)
point.h
Class Point with another overloading of the application operator.
point.cc
Definition of then Point application operator.
prog.cc
Sample uses of the application operators - slightly more realistic.