Addtion of c++ find and replace characters in a string