Adding c++ code