#include <iostream>
#include <string>
using namespace std;
int main()
{
string s1("hampster ");
string s2;
string s3;
s2 = s1;
s3.assign(s1);
cout << s1 << s2 << s3 << endl;
string s4 = "cvbnm";
cout << s4.at(3) << endl;
for(int x=0;x<s4.length();x++)
{
cout << s4.at(x);
}
}
网友评论