Hashtable in C++?

后端 未结 9 853
孤城傲影
孤城傲影 2020-12-02 08:53

I usually use C++ stdlib map whenever I need to store some data associated with a specific type of value (a key value - e.g. a string or other object). The stdlib map implem

相关标签:
9条回答
  • 2020-12-02 09:43

    There is a hash_map object as many here have mentioned, but it is not part of the stl. It is a SGI extension, so if you were looking for something in the STL, I think you are out of luck.

    0 讨论(0)
  • 2020-12-02 09:47

    hash_map is also supported in GNU's libstdc++.

    Dinkumware also supports this, which means that lots of implementations will have a hash_map (I think even Visual C++ delivers with Dinkumware).

    0 讨论(0)
  • 2020-12-02 09:57

    Visual Studio has the class stdext::hash_map in the header <hash_map>, and gcc has the class __gnu_cxx::hash_map in the same header.

    0 讨论(0)
提交回复
热议问题