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

            厚積薄發(fā). 勤為槳,思為帆

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

             采用bind1st和bind2nd的意思,就是把參數(shù)綁定在第一位還是第二位。
            繼承于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所定義的第二個參數(shù)位置傳入。
            如果寫成bind1nd, 則是把szTypeCode作為第一個參數(shù)傳入,那么會報錯。
            因為類型不對。


            posted on 2008-07-14 16:56 kenlistian 閱讀(881) 評論(0)  編輯 收藏 引用 所屬分類: cpp
            亚洲色欲久久久久综合网| 欧美日韩精品久久久免费观看| av无码久久久久不卡免费网站| 久久99国产精品二区不卡| 久久久噜噜噜久久中文字幕色伊伊| 亚洲精品乱码久久久久久蜜桃| 久久久精品2019免费观看| 国产伊人久久| 97久久精品午夜一区二区| 亚洲国产成人精品女人久久久 | 思思久久99热只有频精品66| 色播久久人人爽人人爽人人片AV| 99精品久久精品| 亚洲αv久久久噜噜噜噜噜| 国产综合精品久久亚洲| 99久久99久久久精品齐齐| 久久受www免费人成_看片中文| 狠狠干狠狠久久| 99蜜桃臀久久久欧美精品网站| 久久国产精品波多野结衣AV | 国内精品伊人久久久久影院对白 | 日日躁夜夜躁狠狠久久AV| 亚洲国产成人久久一区WWW| 欧美激情精品久久久久| 996久久国产精品线观看| A级毛片无码久久精品免费| 欧美亚洲国产精品久久| 久久亚洲欧洲国产综合| 99久久免费国产精品| 狠狠干狠狠久久| 久久这里只有精品久久| 国产美女久久精品香蕉69| 国内精品久久久久影院日本| 亚洲国产精品无码久久久蜜芽 | 亚洲国产精品一区二区久久| 久久香蕉超碰97国产精品| 欧美午夜精品久久久久免费视| 久久久久久亚洲精品成人| 久久精品99久久香蕉国产色戒 | 亚洲va中文字幕无码久久| 波多野结衣AV无码久久一区|