A functor is the equivalent to the C callback. This example shows a templated version of a functor. For a more detailed explanation see this brilliant site: www.function-pointer.org