• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            力為的技術博客

            聯系 聚合 管理
              154 Posts :: 1 Stories :: 561 Comments :: 0 Trackbacks
            問題:
            把以下字符串按照空格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 2012-10-06 12:21 力為 閱讀(2038) 評論(2)  編輯 收藏 引用 所屬分類: 4. C++ FAQ

            評論

            # re: 【找茬】split string 2012-10-06 23:47 某某
            boost::split(arrItem, str, boost::is_any_of(" "));
            arrItem.erase(
            std::remove(arrItem.begin(), arrItem.end(), ""),
            arrItem.end());
            std::copy(arrItem.begin(), arrItem.end(),
            std::ostream_iterator<string>(std::cout, "\n"));


            luckycpp@163.com  回復  更多評論
              

            # re: 【找茬】split string 2012-10-08 10:01 hope
            each space is regarded as a delimiter, if you don't specify the last parameter(token_compress_off/_on) of boost::split.  回復  更多評論
              

            久久精品这里只有精99品| 亚洲AV日韩AV天堂久久| 东方aⅴ免费观看久久av| WWW婷婷AV久久久影片| 精品久久久久久无码人妻蜜桃| 狠狠人妻久久久久久综合蜜桃| 亚洲国产精品无码久久久秋霞2| 国产高潮国产高潮久久久91| 人妻精品久久无码区| 伊人精品久久久久7777| 草草久久久无码国产专区| 国产人久久人人人人爽| 狠狠综合久久综合88亚洲| 久久久久国产精品麻豆AR影院| 久久狠狠色狠狠色综合| 久久人人爽人人爽人人AV东京热 | 久久人人超碰精品CAOPOREN| AV狠狠色丁香婷婷综合久久| 一本色道久久99一综合| 日本WV一本一道久久香蕉| 伊人久久大香线蕉精品不卡| 国产日韩久久免费影院| 亚洲国产成人久久综合碰碰动漫3d| 婷婷综合久久中文字幕蜜桃三电影| 久久久国产亚洲精品| 人人狠狠综合久久亚洲| 色综合合久久天天给综看| 久久久久婷婷| 久久免费视频6| 久久久久久久国产免费看| 国产免费久久久久久无码| 国产亚州精品女人久久久久久 | 日产精品久久久久久久| 久久国语露脸国产精品电影| 亚洲午夜无码久久久久小说| 久久婷婷色香五月综合激情| 中文字幕精品无码久久久久久3D日动漫| 久久青青国产| 国产偷久久久精品专区| 综合网日日天干夜夜久久| A级毛片无码久久精品免费|