开发者

does STL has hashmap data structure?

开发者 https://www.devze.com 2023-03-24 09:59 出处:网络
I have used unsorted_map from TR1. I never know any data structure from STL is hashmap. My coworker insists that STL has hashmap, which he cannot (or开发者_运维技巧 not willing )find for me.

I have used unsorted_map from TR1. I never know any data structure from STL is hashmap. My coworker insists that STL has hashmap, which he cannot (or开发者_运维技巧 not willing )find for me. Could anybody judge this argue?

Thanks.


Standard C++98 does not have a hash map, but many implementation of the STL, like the original SGI implementation, do have a hash_map class.


The SGI STL (from which GCC's is based) does have a hash_map implementation. This is not standard C++ however.


In C++0x, there's an unordered_map and unordered_multimap, that'll usually be implemented as hash maps.

If your compiler doesn't have them yet, you can use boost::tr1::unordered_map.

0

精彩评论

暂无评论...
验证码 换一张
取 消