• <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 肥仔 閱讀(1829) 評論(0)  編輯 收藏 引用 所屬分類: Boost & STL

            精品久久久久久无码中文字幕 | 亚洲а∨天堂久久精品| 久久精品?ⅴ无码中文字幕| 久久国产香蕉视频| 无码AV中文字幕久久专区| 99久久99久久精品国产| 久久青青国产| 77777亚洲午夜久久多喷| 欧美久久天天综合香蕉伊| 久久精品国产亚洲AV无码麻豆 | 久久国产精品免费一区| 综合人妻久久一区二区精品| 久久天堂电影网| 久久成人小视频| 久久99精品国产麻豆婷婷| 亚洲av伊人久久综合密臀性色| 99久久99久久精品国产片| 中文精品久久久久人妻不卡| 久久综合久久综合久久综合| 伊人久久大香线蕉av不变影院| 久久成人18免费网站| 久久综合久久综合九色| 久久久一本精品99久久精品66| 久久久久亚洲精品无码网址 | 精品人妻伦一二三区久久| 久久中文字幕一区二区| 中文字幕热久久久久久久| 亚洲一区精品伊人久久伊人 | 亚洲精品蜜桃久久久久久| 亚洲国产香蕉人人爽成AV片久久| 午夜不卡888久久| 久久亚洲国产欧洲精品一| 国产亚洲欧美成人久久片| 久久亚洲私人国产精品| 日韩乱码人妻无码中文字幕久久| 亚洲综合伊人久久大杳蕉| 91麻豆国产精品91久久久| 久久久久亚洲精品日久生情 | 久久露脸国产精品| 亚洲婷婷国产精品电影人久久| 色综合久久天天综线观看|