#include #include int main() { using namespace std; string str1( "abcde" ); string str2( "fghij" ); str1 += str2; // connect str1 and str2 cout << str1 << endl; if( str1 == "abcdefghij" ) { cout << "correct" << endl; } else { cout << "uncorrect" << endl; } cout << "str1 size=" << str1.size() << endl; cout << "str2 size=" << str2.size() << endl; return 0; } ================================ ./a.exe abcdefghij correct str1 size=10 str2 size=5