Skip to content

Instantly share code, notes, and snippets.

@kvannotten
Created October 23, 2010 16:47
Show Gist options
  • Save kvannotten/642423 to your computer and use it in GitHub Desktop.
Save kvannotten/642423 to your computer and use it in GitHub Desktop.
#include <multimap.h>
#include <iostream.h>
using namespace std;
enum Hook{
KRISTOF_HOOK = 0,
ANDERE_HOOK = 1
};
multimap<Hook, int> test;
int main (int argc, char const *argv[])
{
test.insert(pair<Hook, int>(KRISTOF_HOOK, 5));
test.insert(pair<Hook, int>(KRISTOF_HOOK, 10));
test.insert(pair<Hook, int>(ANDERE_HOOK, 7));
multimap<Hook, int>::iterator it;
it = test.find(KRISTOF_HOOK);
if (it != test.end() ){
do{
cout << it->second << endl;
it++;
}while(it != test.upper_bound(KRISTOF_HOOK));
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment