string s; s = "123"; s = s + "0" + s; s = s + s; cout << s;
string s = "123"; s = s + s[1] + s + s[2]; cout << s;
string s = "12345"; int n; n = s.length() + 3; cout << n;
string s = "123456789", s1 = "abcdef"; s = s.substr(4,2) + "0" + s1.substr(2,3); cout << s;
string s = "123456", q = "abc"; s.erase ( 1, 3 ); q.insert ( 1, s ); cout << q;
string s = "123456789"; s.erase( 0, 2 ); int n = s.find("6"); cout << n;
string s = "123456789"; int n = s.find ( "456" ); s.erase ( n+2, 3 ); cout << s;
string s = "123456"; while ( s.length() > 0 ) { s.erase ( 0, 2 ); cout << '1'; }
int c = 0, p; while ( 1 ) { ... if ( p < 0 ) break; S.erase(0, p+2); c ++; }
int c = 0, k; for ( k=0; k<S.length(); k++ ) if ( S[k] == '0' ) { ... }
string Q = "0123456789", S = "0"; int k; for ( k=1; k<10; k++ ) { ... } cout << S;