C++ Code changes