• <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
            久久人人爽人人爽人人片av高请| 久久久久99精品成人片三人毛片 | 一本色综合久久| 久久精品国产男包| 国产精品美女久久久| 香蕉久久夜色精品国产尤物| 久久精品午夜一区二区福利| 观看 国产综合久久久久鬼色 欧美 亚洲 一区二区 | 久久99精品国产麻豆不卡| 色综合久久夜色精品国产| 久久久久亚洲av无码专区导航| 国产精品99久久精品爆乳| 伊人久久大香线蕉AV色婷婷色| 国产91久久综合| 久久亚洲AV成人出白浆无码国产| 国产精品内射久久久久欢欢| 久久精品毛片免费观看| 一本大道久久东京热无码AV| 国产亚洲色婷婷久久99精品91| 一本色道久久综合亚洲精品| 欧美亚洲另类久久综合婷婷| 亚洲国产精品婷婷久久| 蜜臀久久99精品久久久久久小说 | 狠狠综合久久AV一区二区三区| 99久久国产亚洲高清观看2024| 日韩人妻无码精品久久免费一 | 精品亚洲综合久久中文字幕| 2021国内精品久久久久久影院| 久久最新免费视频| 久久国产乱子伦精品免费午夜| 亚洲国产精品久久久久网站| 亚洲国产精品久久久久| 国产精品青草久久久久婷婷| 国产99精品久久| 热久久这里只有精品| 国产精品99久久久久久宅男| 国产成人无码精品久久久免费 | 日韩精品无码久久一区二区三| 精品久久久久中文字| 久久国产精品免费| 亚洲精品国产综合久久一线|