C++ generator