比如说getline了一行
i am a student
然后把它变成vector{“i”,“am”,“a”,“student”}
求大神解答
http://blog.csdn.net/u010555688/article/details/51261451
stringstream str("i am a student" );
string tok;
vector lists;
while( getline( str, tok, ' ' ) )
{
lists.push_back(tok);
cout<<tok << endl;
}