C++ 字符串
字符串分词
#include<sstream>
string str = "hello world";
stringstream ss(str);
string temp;
while(ss >> temp)
{
cout<<temp<<endl;
}
字符串截取
string str = "hello world";
cout<<str.substr(0,2)<<endl;
-------------------------------------------------------------逆水行舟,不进则退。