#include <map>
#include <iostream>
using namespace std;
int main(
int argc,
const char * argv[]
)
{
if( 4 != argc ) {
cerr << "usage: " << endl
<< argv[0] << " index value1 value2" << endl;
exit(1);
}
int index = atoi(argv[1]);
int value1 = atoi(argv[2]);
int value2 = atoi(argv[3]);
multimap<int,int> mm;
mm.insert( pair<int,int>(index,value1) );
mm.insert( pair<int,int>(index,value2) );
cout << "Am I guaranteed that " << mm.find(index)->second << " == "
<< value1 << "?" << endl;
return 0;
}
I have read the STL docs and I did not see this explicitly stated.