#include "hashmap.h" #include #include using namespace std; int main(int argc, char** argv) { hashmap myHash; myHash.insert(make_pair("KeyOne", 100)); myHash.insert(make_pair("KeyTwo", 200)); myHash.insert(make_pair("KeyThree", 300)); for (hashmap::iterator it = myHash.begin(); it != myHash.end(); ++it) { // Use both -> and * to test the operations cout << it->first << " maps to " << (*it).second << endl; } // Create a map with all the elements in the hashmap map myMap(myHash.begin(), myHash.end()); for (map::iterator it = myMap.begin(); it != myMap.end(); ++it) { // Use both -> and * to test the operations cout << it->first << " maps to " << (*it).second << endl; } hashmap myHash2; myHash.swap(myHash2); hashmapmyHash3(myHash2); cout << myHash2.size() << endl; cout << myHash2.max_size() << endl; return (0); }