C++ implement