int main() {
unordered_map<int, int> hashmap;
hashmap.insert(make_pair(0, 0));
hashmap.insert(make_pair(2, 3));
hashmap[1] = 1;
hashmap[1] = 2;
cout << "The value of key 1 is: " << hashmap[1] << endl;
hashmap.erase(2);
if (hashmap.count(2) <= 0) {
cout << "Key 2 is not in the hash map." << endl;
}
cout << "the size of hash map is: " << hashmap.size() << endl;
for (auto it = hashmap.begin(); it != hashmap.end(); ++it) {
cout << "(" << it->first << "," << it->second << ") ";
}
cout << "are in the hash map." << endl;
hashmap.clear();
if (hashmap.empty()) {
cout << "hash map is empty now!" << endl;
}
}