STL是否包含散列表? [英] Does the STL contain a hashtable?
本文介绍了STL是否包含散列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
STL包含散列表的实现?
Does the STL contain an implementation of a hashtable?
如果是这样,你能提供一个简单的例子如何使用它吗?
If so, can you provide a brief example of how to use it?
推荐答案
当前标准实施并不支持, STL :: TR1 ,请参阅无序地图。
Current standard implementation doesn't, STL::TR1 does, see Unordered Map.
大多数现代编译器都有TR1实现,如果失败,您可以随时使用 Boost TR1 实施。
Most modern compilers have a TR1 implementation, if that fails, you may always use the Boost TR1 implementation.
- MSVC通过service pack 1为VS2008提供
- 附带4.x,但你可以使它与3.4.x太工作AFAIR
用法与std几乎相同:: map。
Usage is almost the same as with a std::map.
这篇关于STL是否包含散列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文