Simple C++ setup example with inheritance and callbacks