摘要: hash_map的声明如下:template < class Key, class Type, class Traits=hash_compare<Key, less<Key> >, class Allocator=allocator<pair <const Key, Type> > >class hash_map第四个参数表示map中元素存储的方式,一般情况下,我们都使用pair类型,所以第四个参数使用默认的就可以了。第三个参数是一个仿函数类,提供两个函数,第一个计算hash,第二个比较key的大小,故要求key支持operator 阅读全文
posted @ 2012-09-19 15:57 igody 阅读(681) 评论(0) 推荐(0) 编辑