// 13 交换两个字符串内容的swab函数
/*
#include <iostream>
#include <string>
using namespace std;
int main()
{
//C库函数中有一个swab函数,该函数用来交换字节,那么可不可以交换两个字符串的内容呢?
char ch1[15] = "ofru";
char ch2[] = "";
//swab(ch1,ch2,strlen(ch1)); //不知道什么毛病,用swab总是动行后提示错误
//cout<<"ch1:"<<ch1<<endl;
//cout<<"ch2:"<<ch2<<endl;
//swab函数将第一个字符串的内容按照相邻的偶数字节和奇数字符对调的顺序放置到第二个字符中,第一个字符串保持不变
//显然不能实现字符串的交换
//string中的字符串华交换
string str1="ofru";
string str2="";
str1.swap(str2);
cout<<"str1:"<<str1<<endl;
cout<<"str2:"<<str2<<endl;
return 0;
}*/