• <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
            99久久国产亚洲高清观看2024 | 久久毛片免费看一区二区三区| 伊人久久免费视频| 久久伊人精品青青草原高清| 日日狠狠久久偷偷色综合0| 97精品依人久久久大香线蕉97| 久久久久亚洲AV无码永不| 久久国产免费直播| 青青热久久综合网伊人| 亚洲精品无码久久久久AV麻豆| 国产2021久久精品| 99久久精品影院老鸭窝| 97久久国产综合精品女不卡| 丰满少妇人妻久久久久久 | 亚洲va久久久噜噜噜久久天堂| 久久久久久久综合日本| 久久久av波多野一区二区| 要久久爱在线免费观看| 精品精品国产自在久久高清| 久久99国内精品自在现线| 亚洲精品视频久久久| 精品视频久久久久| 日韩久久久久中文字幕人妻| 99精品久久久久中文字幕| 亚洲人成网亚洲欧洲无码久久| 国产AⅤ精品一区二区三区久久| 嫩草伊人久久精品少妇AV| 精品熟女少妇a∨免费久久| 漂亮人妻被中出中文字幕久久| 久久午夜福利无码1000合集| 韩国三级中文字幕hd久久精品| 久久综合综合久久狠狠狠97色88 | 久久久国产精品亚洲一区 | 国产呻吟久久久久久久92| 9久久9久久精品| 99久久免费国产精品| 大伊人青草狠狠久久| 韩国无遮挡三级久久| 国产美女久久久| 国产精品综合久久第一页| 久久久久久a亚洲欧洲aⅴ|