• <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综合| 亚洲欧美成人久久综合中文网| 国产精品gz久久久| 中文字幕无码久久精品青草| 久久天天躁狠狠躁夜夜avapp| 久久99这里只有精品国产| 精品国产福利久久久| 无码乱码观看精品久久| 97久久超碰国产精品旧版| 亚洲欧美另类日本久久国产真实乱对白 | 久久精品中文无码资源站| 国产国产成人精品久久| 欧美成人免费观看久久| 久久精品国内一区二区三区| 久久久久久A亚洲欧洲AV冫| 狠色狠色狠狠色综合久久| 性高湖久久久久久久久AAAAA| 狼狼综合久久久久综合网| 免费一级欧美大片久久网 | 久久中文字幕视频、最近更新| 久久久久亚洲av综合波多野结衣| 免费国产99久久久香蕉| 久久久午夜精品福利内容| 久久国产精品久久国产精品| 久久久久久久波多野结衣高潮| 精品国产综合区久久久久久| 成人国内精品久久久久影院VR| 欧洲成人午夜精品无码区久久| 久久综合色老色| 亚洲欧洲精品成人久久曰影片| 国产成人精品久久亚洲高清不卡 | 青青草原精品99久久精品66| 久久综合九色综合久99| 久久99精品国产麻豆不卡| 国内精品久久久久久久影视麻豆| 精品无码久久久久国产| 香港aa三级久久三级| 国产精品免费久久| 国内精品久久久久久麻豆| 7国产欧美日韩综合天堂中文久久久久|