• <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
            久久青青草原国产精品免费| 欧美午夜A∨大片久久| 狠狠色丁香久久婷婷综合五月 | 久久成人国产精品| 大香网伊人久久综合网2020| 久久精品亚洲福利| 欧美精品久久久久久久自慰| 久久高清一级毛片| 国产综合久久久久久鬼色| 国产无套内射久久久国产| 久久久久亚洲AV无码专区体验| 久久久久无码精品| 久久99精品久久久久久| 久久久久亚洲国产| 久久福利片| 99久久99久久精品国产片| 少妇久久久久久久久久| 久久免费视频1| 久久久久亚洲精品男人的天堂| 青草影院天堂男人久久| 久久精品国产99久久无毒不卡| 思思久久精品在热线热| 欧美成a人片免费看久久| 国产一区二区三精品久久久无广告| 久久Av无码精品人妻系列| 伊人久久大香线蕉亚洲五月天| 欧美色综合久久久久久| 亚洲国产成人精品久久久国产成人一区二区三区综 | 亚洲伊人久久大香线蕉苏妲己| 无码国产69精品久久久久网站| 亚洲v国产v天堂a无码久久| 天天综合久久一二三区| 一本久久免费视频| 国产精品久久久香蕉| 久久国产劲爆AV内射—百度| 久久成人小视频| 狠狠精品久久久无码中文字幕| 伊人久久大香线蕉av不卡 | 国产精品成人精品久久久| 国产激情久久久久影院老熟女免费| 91精品国产91热久久久久福利 |