C++ codes