随笔分类 -  STL

泛型与模版编程
摘要:unique (ForwardIterator first, ForwardIterator last);unique (ForwardIterator first, ForwardIterator last, BinaryPredicate pred);类属性算法unique的作用是从输入序列中“... 阅读全文
posted @ 2015-06-04 10:30 阿木木在发呆 阅读(251) 评论(0) 推荐(0)
摘要:Reference Constructors vector Constructs a vector of a specific size or with elements of a specific value or with a specific allocator or as a copy of some other vector. Typedefs allocator_type A t... 阅读全文
posted @ 2015-04-19 20:08 阿木木在发呆 阅读(461) 评论(0) 推荐(0)
摘要:Map的基本用法 map内部使用的是红黑树,在map内部所有的数据都是有序的 map插入有三种方法: insert(pair(i,str)); myMap.insert(map::value_type(i,str)); myMap[2] = "a"; map遍历也有三种方法 迭代器 数组 反向迭代器 map删除数据使用erase函数,可以: 用关键字某个元素 迭代器删除某个元素 迭代器... 阅读全文
posted @ 2015-03-27 00:09 阿木木在发呆 阅读(2120) 评论(0) 推荐(0)
摘要:1.accumulate:计算给定区间值的累加和2.函数原型(#include )template Type accumulate( InputIterator _First, InputIterator _Last, Type _Val );templat... 阅读全文
posted @ 2014-11-28 23:04 阿木木在发呆 阅读(142) 评论(0) 推荐(0)