摘要:
问题:set是一个自动有序的集合容器,这是set的一个最实惠的性质,从小到大,只要你插入进去,就有序了。但是,如果你不想要这个顺序呢,是不是可以人为控制set容器的元素顺序呢?答案是,可以的,因为stl也是程序员设计的。首先看stl的模板构造函数explicit set ( const Compare& comp = Compare(), const Allocator& = Allocator() );templateset ( InputIterator first, InputIterator last, const Compare& comp = Compare 阅读全文
posted @ 2012-10-30 08:14
智慧的老鸟
阅读(1275)
评论(0)
推荐(0)