【找茬】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(" "));
使用以上代码不能达到目的。问题出在哪里?
把以下字符串按照空格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(" "));
使用以上代码不能达到目的。问题出在哪里?
相关文章推荐
- 用lambda对std::list排序 - 力为的技术博客 - C++博客
- 失足于shared_ptr - 力为的技术博客 - C++博客
- reserve和resize - 力为的技术博客 - C++博客
- Goodbye, VC Intellisense ! - 力为的技术博客 - C++博客
- 用wxWidgets做界面 - 力为的技术博客 - C++博客
- std::istream 和 '\r' - 力为的技术博客 - C++博客
- 用istringstream 解决问题一则 - 力为的技术博客 - C++博客
- 从半同步-半异步模式谈服务器的设计 - 那谁的技术博客 - C++博客
- boost库之Hash - 兔子的技术博客 - C++博客
- 几个非常好的C++技术博客
- c/c++ 国外技术博客
- 这篇不是什么技术博客,只是C++上课的例题,做个笔记
- 枚举串口四法 - franksunny的个人技术空间 - C++博客
- 推荐C++技术博客 各种C++问题
- 一个技术博客,关于PE_C++_驱动_病毒
- C++ 初始化函数的实现 - Ling Xu 的 C++ 技术随笔 - C++博客
- 七叶树之技术博客 C++的常用库(转载)
- centos 使用fedora源 - C++ 技术中心 - C++博客
- 【C/C++相关】论程序员写技术博客的重要性
- epoll精髓 - C++ 技术中心 - C++博客