#include #include using namespace std; int main() { string first( "one" ); string second( "two" ); // output strings cout << "Before swap:\n first: " << first << "\nsecond: " << second; first.swap( second ); // swap strings cout << "\n\nAfter swap:\n first: " << first << "\nsecond: " << second << endl; system("pause"); return 0; } // end main