读取一行多个字符串的方法
while(getline(cin,line))
{
string x;
flag1++;
flag2=0;
stringstream ss(line);
while(ss>>x)
{
cout<<x<<' ';
flag2++;
t[flag1][flag2]=x;
}
cout<<endl;
}
撒花~
while(getline(cin,line))
{
string x;
flag1++;
flag2=0;
stringstream ss(line);
while(ss>>x)
{
cout<<x<<' ';
flag2++;
t[flag1][flag2]=x;
}
cout<<endl;
}
撒花~
相关推荐
只想搞钱的鸽子很喜欢...:混账是很多的,还有那些在自己风华正茂的年纪说风凉话讥讽那些下岗前员工的。这些人都是现在职场环境这么烂的帮凶