随笔分类 - STL
泛型与模版编程
摘要:unique (ForwardIterator first, ForwardIterator last);unique (ForwardIterator first, ForwardIterator last, BinaryPredicate pred);类属性算法unique的作用是从输入序列中“...
阅读全文
摘要: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...
阅读全文
摘要:Map的基本用法 map内部使用的是红黑树,在map内部所有的数据都是有序的 map插入有三种方法: insert(pair(i,str)); myMap.insert(map::value_type(i,str)); myMap[2] = "a"; map遍历也有三种方法 迭代器 数组 反向迭代器 map删除数据使用erase函数,可以: 用关键字某个元素 迭代器删除某个元素 迭代器...
阅读全文
摘要:1.accumulate:计算给定区间值的累加和2.函数原型(#include )template Type accumulate( InputIterator _First, InputIterator _Last, Type _Val );templat...
阅读全文

浙公网安备 33010602011771号