TableOfContents([maxdepth])

STL概述

STL是Standard Template Library的缩写,是C++标准库中最强大、最复杂、最有用的部分。STL主要由容器(container)、跌代子(iterator)、算法(algorithm)所组成。还有仿函数(functor)、适配器(adapter)、配置器(allocator)等辅助组件。

1. 容器container

容器是存放和管理数据元素的数据结构,分为两大类:顺序容器(sequence container)和关联容器(associative container)。

除此以外还有:

2. 跌代子iterator

跌代子是用来访问容器内元素的对象,类似指针。 跌代子根据能力的不同,分为:

另外还有

ch3n2k.com | Copyright (c) 2004-2020 czk.