• <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++博客 首頁 新隨筆 聯系 聚合 管理
              217 Posts :: 61 Stories :: 32 Comments :: 0 Trackbacks
            搞了搞split,發現boost里邊已經有了,就拿過來直接用,之前翻了下facebook的,也沒見比boost更容易讀,還是boost算了。
            在vs2012上編譯了一下,發現有問題: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 閱讀(1058) 評論(0)  編輯 收藏 引用 所屬分類: boost
            一本色道久久综合| 久久精品国产亚洲AV影院| 伊人精品久久久久7777| 99国产精品久久| 国产成人精品三上悠亚久久| 久久精品免费大片国产大片| 久久99精品久久久久久久不卡 | 国产福利电影一区二区三区久久老子无码午夜伦不 | 亚洲欧美一级久久精品| 99久久99久久精品国产| 97久久超碰成人精品网站| 97精品依人久久久大香线蕉97| 深夜久久AAAAA级毛片免费看| 亚洲伊人久久大香线蕉苏妲己| 精品国产乱码久久久久久1区2区 | 久久综合九色综合久99| 国产高潮国产高潮久久久91 | 国产精品久久久久久久久免费 | 亚洲国产精品高清久久久| 日本精品久久久久影院日本| 国内精品久久久久影院网站| 亚洲国产成人久久精品影视| 精品久久一区二区| 99久久99久久精品国产片| 亚洲国产精品婷婷久久| 一级做a爰片久久毛片人呢| 国产精品九九久久免费视频 | 久久九九久精品国产免费直播| 国产精品99久久精品爆乳| 久久精品国产国产精品四凭| 久久综合九色欧美综合狠狠| 一级a性色生活片久久无| 亚洲色大成网站www久久九| 久久亚洲AV成人无码国产| 2021少妇久久久久久久久久| 久久99国产精品久久久| 精品国产一区二区三区久久蜜臀| 三级韩国一区久久二区综合| 久久久一本精品99久久精品88| 久久99国产综合精品| 国产精品九九久久精品女同亚洲欧美日韩综合区 |