C++ map使用(基于hashtable) 实际上基于hashtable的map有两种一种是hash_map,unordered_map,但是最好使用后者,原因如下[1] 因为标准化的推进,unordered_map原来属于boost分支和std::tr1中,而hash_map属于非标准容器. 另外,使用之后,感觉速度和hash_map差不多,但是支持string做key,也可以使用复杂的对象作为key. 速度上unordered_map>hash_map>map 具体的使用方式可以参考[3…