function pointer

In C-style programming, function pointers are used primarily to pass functions to other functions. This technique allows the caller to customize the behavior of a function without modifying it.  In modern C++, lambda expressions provide the same capability with greater type safety and other advantages.