• <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 閱讀(1070) 評論(0)  編輯 收藏 引用 所屬分類: boost
            久久久久久国产精品美女| 日韩人妻无码精品久久久不卡| 狠色狠色狠狠色综合久久| 久久久国产精品福利免费| 久久伊人中文无码| 99久久99这里只有免费的精品| 亚洲国产一成久久精品国产成人综合 | 亚洲va久久久久| 国产福利电影一区二区三区久久老子无码午夜伦不 | 色综合久久久久无码专区| 四虎国产精品成人免费久久| 丁香狠狠色婷婷久久综合| 久久av高潮av无码av喷吹| 97精品伊人久久久大香线蕉| 国产精品久久久久国产A级| 午夜视频久久久久一区| 激情伊人五月天久久综合| 久久人人爽人人澡人人高潮AV| 无码国内精品久久人妻蜜桃| 久久国产免费直播| 久久精品国产亚洲一区二区三区| 亚洲AV日韩精品久久久久久久 | 午夜精品久久久久成人| 狠狠色丁香久久综合五月| 亚洲午夜久久久影院伊人| 奇米影视7777久久精品人人爽| 噜噜噜色噜噜噜久久| 亚洲综合精品香蕉久久网97| 亚洲精品乱码久久久久久| 99精品国产免费久久久久久下载| 国产精品无码久久四虎| 伊人久久精品线影院| 99久久精品免费看国产| 日本久久久精品中文字幕| 国产精品久久久久影院色 | 久久精品成人免费观看97| 一本大道久久a久久精品综合| 精品免费tv久久久久久久| 国产精品天天影视久久综合网| 精品无码久久久久国产| 久久精品国产秦先生|