标签: c++ istringstream
if (1 != sscanf(line, "%s", name)) continue;
我们在代码的前面有
char line[128]; char name[128];
使用istringstream而不是sscanf编写此行的另一种方法是什么?
答案 0 :(得分:0)
std::istringstream stream( line ); if( !( stream >> name ) ) continue;