#include"stdafx.h"
#include<iostream>
#include<string>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
string s1;
string s2;
string s3 = "hiya";
string s4(10, 'c');
string s5(s3 + s4);
cout << s1 << endl;
cout << s2 << endl;
cout << s3 << endl;
cout << s4 << endl;
cout << (s3 + s4) << endl;
cout << s5 << endl;
return 0;
}
执行结果如下: