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

            woaidongmao

            文章均收錄自他人博客,但不喜標題前加-[轉貼],因其丑陋,見諒!~
            隨筆 - 1469, 文章 - 0, 評論 - 661, 引用 - 0
            數據加載中……

            std::unique,最后的仿函數,是基于“==”比較符號的

            #include <iostream>
            #include <algorithm>
            #include <vector>
            using namespace std;
            
            bool myfunction (int i, int j) {
              return (i==j);
            }
            
            int main () {
              int myints[] = {10,20,20,20,30,30,20,20,10};    // 10 20 20 20 30 30 20 20 10
              vector<int> myvector (myints,myints+9);
              vector<int>::iterator it;
            
              // using default comparison:
              it = unique (myvector.begin(), myvector.end()); // 10 20 30 20 10 30 20 20 10
                                                              //                ^
            
              myvector.resize( it - myvector.begin() );       // 10 20 30 20 10
            
              // using predicate comparison:
              unique (myvector.begin(), myvector.end(), myfunction);   // (no changes)
            
              // print out content:
              cout << "myvector contains:";
              for (it=myvector.begin(); it!=myvector.end(); ++it)
                cout << " " << *it;
            
              cout << endl;
            
              return 0;
            }
            

            posted on 2013-03-26 16:17 肥仔 閱讀(1837) 評論(0)  編輯 收藏 引用 所屬分類: Boost & STL

            久久久久亚洲av毛片大| 久久夜色精品国产亚洲| 久久久精品国产亚洲成人满18免费网站| 久久国产精品一区| 久久人妻少妇嫩草AV无码专区| 狠狠人妻久久久久久综合| 无码人妻精品一区二区三区久久 | 国产精品久久久天天影视香蕉 | 欧美伊香蕉久久综合类网站| 国产免费久久精品99re丫y| 91精品国产91久久| 国内精品久久久久久99| 亚洲中文久久精品无码| 久久久久国产一级毛片高清板| 国产国产成人精品久久| 久久精品无码专区免费东京热| 免费精品国产日韩热久久| 精品久久人人妻人人做精品| 国产国产成人精品久久| 精品熟女少妇a∨免费久久| 久久大香萑太香蕉av| 久久久久亚洲AV无码专区网站 | 亚洲国产成人精品久久久国产成人一区二区三区综 | 久久免费的精品国产V∧| 狠狠色婷婷久久综合频道日韩| 久久伊人五月天论坛| 久久黄视频| 亚洲国产视频久久| 天天综合久久一二三区| 一级做a爰片久久毛片毛片| 欧洲性大片xxxxx久久久| 无码精品久久一区二区三区| 久久久不卡国产精品一区二区| 久久99精品久久久久久秒播| 久久99亚洲综合精品首页| 久久久久久国产a免费观看不卡| 久久久久人妻精品一区三寸蜜桃 | 久久精品国产国产精品四凭| 久久久久国色AV免费观看| 久久久国产精华液| 久久人人爽人人爽人人AV东京热|