stringstream¶ 约 9 个字 9 行代码 预计阅读时间不到 1 分钟 以空格分割字符串¶ string s = "hello world hey brother manba out"; stringstream ss(s); string word; int cnt = 0; while(ss >> word){ cout << word << endl; cnt++; } cout << cnt << endl; 颜色主题调整 red pink purple indigo blue cyan teal green lime orange brown grey black white 评论区~ 有用的话请给我个赞和 star => 快来跟我聊天~