vs2008使用hashmap

关于hashmap的介绍:http://blog.chinaunix.net/uid-23480159-id-2421724.html

但是,在vs2008中使用hashmap时,出现如下错误:

error C2065: “hash_map”: 未声明的标识符。

原来,hash_map目前是vs2008的一个扩展,并没有在标准的c++中。要想使用hash_map,需要using namespace stdext;但是,这很可能产生命名空间冲突,可以加上:using stdext::hash_map.

你可能感兴趣的:(vs2008使用hashmap)