• <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资源网站| 伊人久久大香线蕉av一区| 色噜噜狠狠先锋影音久久| 久久有码中文字幕| 久久人人爽人人爽人人片av高请| 国产韩国精品一区二区三区久久| 色综合久久中文综合网| 国产精品久久久久a影院| 久久久久久亚洲Av无码精品专口 | 狠狠精品久久久无码中文字幕 | 91精品国产9l久久久久| 精品久久久久久国产三级| 一本色道久久综合狠狠躁| 久久精品国产亚洲av瑜伽| 久久99精品久久只有精品| 久久亚洲中文字幕精品一区| 久久亚洲欧美国产精品| 亚洲国产婷婷香蕉久久久久久| 日本精品久久久中文字幕| 狠狠综合久久AV一区二区三区 | 久久免费看黄a级毛片| 97精品伊人久久久大香线蕉| 囯产精品久久久久久久久蜜桃 | 久久国内免费视频| 成人国内精品久久久久影院VR| 国产精品久久久久jk制服| 中文字幕久久波多野结衣av| 久久久这里只有精品加勒比| 久久久久无码精品| 精品无码人妻久久久久久| 好属妞这里只有精品久久| 久久精品国产99久久无毒不卡 | 婷婷久久综合九色综合九七| 97久久精品人人做人人爽| 久久99国产精品一区二区| 久久国产色av免费看| 久久精品国产免费观看| 伊人久久大香线蕉亚洲| 国内精品伊人久久久久AV影院| 日本人妻丰满熟妇久久久久久| 亚洲人成伊人成综合网久久久|