C++中的容器

2015-07-16 12:57:33 · 作者: · 浏览: 12

容器包括vector, deque, list, map, multimap, set, multiset。容器适配器包括基于deque的stack和queue,基于vector的priority_queue。string也实现了stl的接口。


因为编写C++程序时经常需要查找容器的函数接口,故作此总结。C++新引入的容器与函数未引入。主要参考自:STL Containers and Container Adaptors


包括vector,deque,list


包括stack,queue,priority_queue


参见The STL Sequential Containers and Container Adaptors,
and their Member Functions


包括map, multimap, set, multiset


其实不存在特有函数,只是这些函数的接口略有不同


参见The STL Associative Containers and their Member Functions


包括string,bitset等类容器