标签:
#include<iostream> #include<string> using namespace std; void main() { string str1("i am here!"); string str2="where are you?"; cout << str1[0] << str1[9] << "," << str1 << endl; cout << str2[0] << str2[13] << "," << str2 << endl; cout << "please input you name:"; cin >> str1; cout << str1 << endl; cout << "length of the name is :" << str1.size() << endl; cout << str2 + " " + str1 << endl; }
输出结果
end!
标签:
原文地址:http://www.cnblogs.com/changbo/p/5267762.html