Example of a templated C++ functor class

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