#include <iostream>
#include <sstream>
using namespace std;
int main()
{
string s = "1 2 3";
istringstream str(s);
while (str >> s) {
cout << s << endl;
}
return 0;
}
C++以空格为分隔符分隔string类型
最新推荐文章于 2024-04-16 16:17:40 发布