• <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>

            kenlistian

            厚積薄發. 勤為槳,思為帆

               :: 首頁 :: 新隨筆 ::  :: 聚合  :: 管理 ::
              73 隨筆 :: 4 文章 :: 22 評論 :: 0 Trackbacks

             采用bind1st和bind2nd的意思,就是把參數綁定在第一位還是第二位。
            繼承于binary_function 類.
            描述如下
            Class binder1st binds the value to the first argument of the binary function, and binder2nd does the same thing
            for the second argument of the function.

            如下:例子

            struct compare_str :binary_function<ST_DataResult*, char*, bool>
            {
            public:
                bool operator()(ST_DataResult* pDataRet, char* szTypeCode) const
                {
                    return strcmp(pDataRet->sType , szTypeCode) == 0 ? true : false;
                   
                }
            };


            。。。

            char szTypeCode[4] = {'\0'};
            strcpy(szTypeCode, sTypeCode);
            pIt = find_if(m_d_ret_data.begin(), m_d_ret_data.end(),
                    bind2nd(compare_str(), szTypeCode));

            其中把szTypeCode變量傳入到compare_str所定義的第二個參數位置傳入。
            如果寫成bind1nd, 則是把szTypeCode作為第一個參數傳入,那么會報錯。
            因為類型不對。


            posted on 2008-07-14 16:56 kenlistian 閱讀(873) 評論(0)  編輯 收藏 引用 所屬分類: cpp
            亚洲AV日韩AV永久无码久久| 97久久综合精品久久久综合| 欧美日韩精品久久免费| 精品综合久久久久久97| 97久久超碰国产精品2021| 久久se这里只有精品| 漂亮人妻被中出中文字幕久久| 久久国产精品无| 色综合久久久久综合体桃花网| 99re久久精品国产首页2020| yy6080久久| 久久精品草草草| 四虎影视久久久免费| 久久久久亚洲AV无码专区桃色| 精产国品久久一二三产区区别| 久久免费小视频| 亚洲精品乱码久久久久久蜜桃不卡| 久久97久久97精品免视看秋霞| 人妻无码αv中文字幕久久琪琪布| 国产成人久久精品二区三区| 久久午夜伦鲁片免费无码| 伊人久久大香线蕉AV一区二区| 亚洲午夜久久久精品影院| 久久久久久九九99精品| 久久精品一本到99热免费| 精品久久人人妻人人做精品| 久久噜噜电影你懂的| 久久久久成人精品无码中文字幕| 久久精品人妻中文系列| 久久青青草视频| 亚洲人成网站999久久久综合 | 欧美精品九九99久久在观看| 99久久国产综合精品成人影院 | 久久久久国产日韩精品网站| 久久亚洲国产中v天仙www| 国产精品久久久久久福利69堂| 久久天堂AV综合合色蜜桃网| 亚洲第一极品精品无码久久| 亚洲AV无码久久精品色欲 | 国产伊人久久| 久久伊人影视|