• <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>

            Error

            C++博客 首頁 新隨筆 聯(lián)系 聚合 管理
              217 Posts :: 61 Stories :: 32 Comments :: 0 Trackbacks
            搞了搞split,發(fā)現(xiàn)boost里邊已經(jīng)有了,就拿過來直接用,之前翻了下facebook的,也沒見比boost更容易讀,還是boost算了。
            在vs2012上編譯了一下,發(fā)現(xiàn)有問題:error C4996: 'std::_Copy_impl': Function call with para

            找了下,老外是這么說的:http://stackoverflow.com/questions/14141476/warning-with-boostsplit-when-compiling

            You haven't done anything wrong. Visual Studio is being overly cautious. In debug mode, visual studio uses something called "Checked Iterators". Pointers are also iterators, but the checking mechanism doesn't work with them. So when a standard library algorithm is called with pointers, which is something that boost::split does, it issues this warning.

            You'll get the same warning with this obviously safe code:

            int main()
            {
                int x[10] = {};
                int y[10] = {};
                int *a = x, *b = y;
                std::copy(a, a+10, b);
            }

            Disable the warning. It's for beginners. It's on by default for the safety of beginners, because if it was off by default, they wouldn't know how to turn it on.





            #include <boost/algorithm/string/classification.hpp>
            #include <boost/algorithm/string.hpp>
            void LearnSplit()
            {
                std::string strTem("1,2,3,4");
                std::list<std::string> listStrTem;
                std::vector<std::string> vectorStrTem;
                boost::split(listStrTem, strTem, boost::is_any_of(","));
                boost::split(vectorStrTem, strTem, boost::is_any_of(","));
                for(auto item : listStrTem)
                {
                    std::cout << item.c_str() << std::endl;
                }
                std::string s = "Hello, the beautiful world!";
                std::vector<std::string> rs;
                boost::split( rs, s, boost::is_any_of( " ,!" ), boost::token_compress_on );
            }
            int _tmain(int argc, _TCHAR* argv[])
            {
                LearnSplit();
            return 0;
            }
            posted on 2013-04-11 00:29 Enic 閱讀(1067) 評論(0)  編輯 收藏 引用 所屬分類: boost
            四虎国产精品免费久久| 国产69精品久久久久9999| 亚洲天堂久久久| 久久精品日日躁夜夜躁欧美| 久久国语露脸国产精品电影| 久久丫忘忧草产品| 久久99精品久久久久久久不卡| 久久国产精品-久久精品| 青春久久| 久久91精品国产91久久麻豆| 香蕉久久夜色精品国产尤物| 久久发布国产伦子伦精品| 久久伊人精品青青草原日本| 精品久久久久香蕉网| 久久综合九色综合久99| 国产午夜免费高清久久影院| 久久免费视频6| 99热成人精品免费久久| 国产婷婷成人久久Av免费高清| 久久综合亚洲色HEZYO国产| 国产精品免费福利久久| 亚洲国产另类久久久精品黑人 | 久久久久久久久久久久中文字幕| 久久er国产精品免费观看8| 国产韩国精品一区二区三区久久| 久久综合色老色| 欧美一级久久久久久久大| 国产精品视频久久久| 久久国产欧美日韩精品| 无码任你躁久久久久久久| 国产免费久久精品丫丫| 国产99久久久国产精免费| a高清免费毛片久久| 国产精品久久久久9999| 久久精品aⅴ无码中文字字幕不卡| 久久青青草视频| 亚洲精品蜜桃久久久久久| 一本色道久久综合亚洲精品| 亚洲国产精品无码久久久不卡| 亚洲第一极品精品无码久久| 久久精品国产亚洲AV香蕉|