Created
October 23, 2010 16:47
-
-
Save kvannotten/642423 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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