浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

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

问题:
把以下字符串按照空格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(" "));

使用以上代码不能达到目的。问题出在哪里?
posted on 2013-01-24 22:46  lexus  阅读(133)  评论(0编辑  收藏  举报