#include #include using namespace std; void swap (string& s1, string& s2); int main(){ string str1 = "Bruce", str2 = "Kat"; cout << str1 << ' ' << str2 << endl; swap(str1, str2); cout << str1 << ' ' << str2 << endl; return 0; } void swap (string &s1, string &s2){ string temp = s1; cout << "swap: " << s1 << ' ' << s2 << endl; s1 = s2; s2 = temp; cout <<"swap: " << s1 << ' ' << s2 << endl; }