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