在Visual C++下,我们有“hash_map”和“hash_set”。在g ++中,我们有“stdext :: hash_map”和“stdext :: hash_set”。在各自的表现或其他因素方面是否有差异?hash_map和stdext :: hash_map?
2
A
回答
2
这些都不是标准。他们只是为了满足需要。关于表演,我不知道,但我想他们真的很相似。
TR1中存在什么,并且将包含在C++中1X是unordered_map和unordered_set 他们说他们改变了名称以避免与以前的非标准实现混淆。
http://www2.research.att.com/~bs/C++0xFAQ.html#std-unordered
1
如狄指出,标准是(或将要)unordered_map。如何得到它有点混乱。可能前进的最好的方法是:
g++ -std=c++0x mymap.cpp
:
#include <unordered_map>
int main() {
std::unordered_map<int,int> m;
}
,并用G ++与C++ 0X开关编译
相关问题
- 1. 嵌套stdext ::的hash_map迭代
- 2. 由于性能原因,替代stdext :: hash_map
- 3. stdext :: hash_map不清楚哈希函数
- 4. 使用stdext :: hash_set/hash_map与对象指针进行冲突
- 5. 序列化stdext ::使用的hash_map升压串行化库
- 6. 如何使用stdext :: hash_map键是一个自定义对象?
- 7. stdext :: hash_map升级到visual studio 10后编译错误
- 8. hash_map不工作
- 9. hash_map questions/tutorial
- 10. AIX上的hash_map?
- 11. map vs hash_map in C++
- 12. SGI hash_map:基本查询
- 13. C++读取文件到hash_map
- 14. 字典/ hash_map密钥大小
- 15. 删除元素的hash_map
- 16. 解耦版本的hash_map/unordered_map
- 17. hash_map和unordered_map之间的区别?
- 18. 使用hash_map和unordered_map运行C++程序
- 19. 如何使用字符串字符串hash_map(hash_map <string,string,stringHashFunction>在Linux C++
- 20. 如何在C++ 4.4.6中包含hash_map?
- 21. 错误:的hash_map没有指定类型
- 22. 如何搜索包含reference_wrapper的hash_map?
- 23. 如何获取散列值,C++ hash_map
- 24. 如何查找的hash_map在C++?
- 25. 在Stl Hash_map中查找密钥
- 26. 如何在窗口上使用“hash_map”
- 27. hash_map是STL的一部分吗?
- 28. 不能在Mac OSX找到了hash_map头
- 29. 错误:“的hash_map”不是“性病”
- 30. Stroustrup的hash_map的实现是错误的?