• <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>
            隨筆 - 505  文章 - 1034  trackbacks - 0
            <2008年1月>
            303112345
            6789101112
            13141516171819
            20212223242526
            272829303112
            3456789


            子曾經曰過:編程無他,唯手熟爾!

            常用鏈接

            留言簿(94)

            隨筆分類(649)

            隨筆檔案(505)

            相冊

            BCB

            Crytek

            • crymod
            • Crytek's Offical Modding Portal

            Game Industry

            OGRE

            other

            Programmers

            Qt

            WOW Stuff

            搜索

            •  

            積分與排名

            • 積分 - 917347
            • 排名 - 14

            最新隨筆

            最新評論

            閱讀排行榜

            評論排行榜

            下面代碼在vc7.1都不能編譯通過,不知道bcb6能不能?

            #include <hash_map>

            struct stUpdateItem
            {
                std::
            string _strPath;
                
            bool _bDownloadSucceeded;

                stUpdateItem(
            const std::string& path) 
                    : _bDownloadSucceeded(
            false)
                    , _strPath(path)
                {
                }
            };

            typedef std::hash_map
            <std::string, stUpdateItem> tUpdateItems;

            void ChangeValue(bool* pDownloadSucceeded )
            {
                
            if (pDownloadSucceeded)
                {
                    
            *pDownloadSucceeded = true;
                }
            }

            void ProcessPackFile(stUpdateItem& item)
            {
                ChangeValue(
            &(item._bDownloadSucceeded));
            }

            int _tmain(int argc, _TCHAR* argv[])
            {
                stUpdateItem item1(
            "data\\model.pak");
                stUpdateItem item2(
            "date\\texture.pak");
                
                tUpdateItems items;

                items.insert(tUpdateItems::value_type(item1._strPath, item1));
                items.insert(tUpdateItems::value_type(item2._strPath, item2));

                
            for (tUpdateItems::const_iterator it = items.begin(); it != items.end(); ++it)
                {
                    ProcessPackFile(it
            ->second);
                }
                
            return 0;
            }
            vc7.1 編譯錯誤:
            f:\Practise\Practise_2003\hash_map_const_iterator_test\hash_map_const_iterator_test.cpp(46) : error C2664: “ProcessPackFile” : 不能將參數 1 從“const stUpdateItem”轉換為“stUpdateItem &
                    轉換丟失限定符

            posted on 2007-11-01 17:26 七星重劍 閱讀(2094) 評論(2)  編輯 收藏 引用 所屬分類: PL--c/c++

            FeedBack:
            # re: 用std::hash_map的const_iterator改變元素second的值會怎樣?  2007-11-02 23:36 eray
            都是const了,不讓修改應該是正常的吧?  回復  更多評論
              
            # re: 用std::hash_map的const_iterator改變元素second的值會怎樣?  2007-11-03 15:16 重劍
            @eray
            嗯,是的。好像bcb下就能編譯通過。還沒測試  回復  更多評論
              
            国产精品99久久久久久宅男| 欧美黑人激情性久久| AAA级久久久精品无码片| 99久久国产亚洲综合精品| 久久强奷乱码老熟女网站| 国产精品熟女福利久久AV| 青青热久久综合网伊人| 99久久精品国产毛片| 狠狠人妻久久久久久综合蜜桃| 国产精品久久久久一区二区三区| 久久精品国产福利国产秒| 国产免费久久精品99久久| 久久夜色撩人精品国产| 久久久久久综合网天天| 精品无码久久久久久午夜| 久久青草国产精品一区| 久久精品国产福利国产琪琪| 久久人人超碰精品CAOPOREN| 一级a性色生活片久久无少妇一级婬片免费放| 久久久久久久国产免费看| 国产精品久久婷婷六月丁香| 久久棈精品久久久久久噜噜| 久久久久久综合一区中文字幕| AA级片免费看视频久久| 久久国产AVJUST麻豆| 久久婷婷五月综合色奶水99啪| 51久久夜色精品国产| 香蕉久久久久久狠狠色| 国产精品久久免费| 亚洲国产综合久久天堂 | 91超碰碰碰碰久久久久久综合| 国产精品久久久久天天影视| 久久九九久精品国产免费直播| 亚洲精品高清一二区久久 | 欧美麻豆久久久久久中文| 97精品依人久久久大香线蕉97| 亚洲国产精品久久久久网站| 久久无码中文字幕东京热| 国産精品久久久久久久| 国产精品久久久久jk制服| 2019久久久高清456|