以下の内容はhttps://iww.hateblo.jp/entry/20120730/pairより取得しました。


ソートされないmultimap

もうmapでもなんでもない

#include <iostream>
#include <vector>
#include <string>
using namespace std;

int main(){
    typedef pair<string,int> P;
    typedef vector<P> M;
    typedef M::iterator MIT;

    M list;
    list.push_back( P( "hoge", 1 ) );
    list.push_back( P( "piyo", 2 ) );
    list.push_back( P( "fuga", 3 ) );
    list.push_back( P( "hoge", 4 ) );
    list.push_back( P( "piyo", 5 ) );
    list.push_back( P( "hoge", 6 ) );

    cout << "■全部" << endl;
    for( MIT it=list.begin(); it!=list.end(); ++it ){
        cout << it->first << ':' << it->second << endl;
    }

    return 0;
}



以上の内容はhttps://iww.hateblo.jp/entry/20120730/pairより取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14