C++ rework