adding c++ code