I used unsorted_map from TR1. I never know which data structure from STL is hashmap. My colleague insists that the STL has a hashmap that it cannot (or does not want) to find for me. Can anyone judge this?
Thanks.
The C ++ 98 standard does not have a hash map, but many STL implementations, such as the original SGI implementation , have a hash_map class.
The SGI STL (of which GCC is based) has hash_map . However, this is not standard C ++.
hash_map
In C ++ 0x there are unordered_map and unordered_multimap , which will usually be implemented as hash maps.
unordered_map
unordered_multimap
If your compiler does not already have them, you can use boost::tr1::unordered_map .
boost::tr1::unordered_map