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

            久久久久四虎国产精品| 久久天天躁狠狠躁夜夜avapp| 国产99久久久久久免费看| 99久久精品无码一区二区毛片| 色8激情欧美成人久久综合电| 人妻无码中文久久久久专区| 久久99精品国产| 思思久久99热只有频精品66| 99re这里只有精品热久久| 久久久久久av无码免费看大片| 五月丁香综合激情六月久久| 欧美麻豆久久久久久中文| 久久精品国产99国产电影网| 久久久久久伊人高潮影院| 国产精品热久久毛片| 久久91精品国产91久久小草| 久久只这里是精品66| 久久国产精品免费| 婷婷综合久久狠狠色99h| 色欲综合久久躁天天躁蜜桃| 久久99热这里只频精品6| 久久精品国产色蜜蜜麻豆 | 亚洲国产成人精品女人久久久| 久久97精品久久久久久久不卡| 久久综合亚洲鲁鲁五月天| 日韩AV毛片精品久久久| 成人a毛片久久免费播放| 国内精品九九久久久精品| 中文字幕乱码久久午夜| 漂亮人妻被中出中文字幕久久| 狠狠精品干练久久久无码中文字幕| 精品久久久久久| 色综合久久最新中文字幕| 久久久久久狠狠丁香| 久久综合综合久久97色| 亚洲一本综合久久| 久久久久亚洲av毛片大| 久久久久国产成人精品亚洲午夜| 久久亚洲色一区二区三区| 日本久久久久久久久久| 久久久久久国产精品无码下载|