您的位置:首页 > 编程语言 > C语言/C++

【找茬】split string - 力为的技术博客 - C++博客

2013-01-24 22:46 281 查看
【找茬】split string - 力为的技术博客 - C++博客

【找茬】split string问题:
把以下字符串按照空格split
string str=" 50 4 13.900 0.400 -0.600";
“方案”一:
用boost::split
#include "boost/algorithm/string.hpp"std::vector<string> arrItem;
boost::split(arrItem, str, boost::is_any_of(" "));
使用以上代码不能达到目的。问题出在哪里?
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: