C++ String Insert string, remove characters, replace substring
#include <iostream> using namespace std; int main() /*www .jav a2s. com*/ { string words = "Something interesting and bizarre"; cout << words << endl; words.insert(10, "seriously "); cout << words << endl; words.erase(19,16); cout << words << endl; words.replace(4, 5, "body"); cout << words << endl; return 0; }