#include <iostream>
#include <string>
using namespace std;
int main(){
string s1( "A " );
string s1_original( s1 );
string s2( "B " );
cout << "String 1: " << s1 << endl << "String 2: " << s2;
s1 += s2;
cout << s1;
s1 = s1_original;
cout << "String 1: " << s1 << "\nString 2: " << s2;
s1 += s2.substr( 0, 18 );
cout << s1;
}
|