This has to do with C++. Usually, when you create a class, you want to encapsulate your data inside the class. The creation of callback functions as member data in a class can be tricky and problematic. A multitude of C libraries contain callback functions that allow one to access movement of the mouse or keyboard, for example. SDL2, Freeglue, SFML,... Etc., are such examples. Callback functions are ubiquitous in C programming; however, there is no concept for OOP in C. C++ tries to be fully compatible with C codes. It is possible to treat callback functions as member data in C++ using std::bind(), which is one of many solutions. You can search for this since it is a common issue when using C libraries.