C++ code added