#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;
}
标签:std,main,string,istringstream,C++,str,分隔符,include
来源: https://blog.csdn.net/m0_46283220/article/details/115278142