序列容器包含在类,必须保持订购of elements in the容器。序列容器定义了特性是你可以选择where to插入的元素的位置。the most common example of a序列容器is the阵列:如果你插入元素进入炉年阵列,the elements will bein the order你正确插入他们。
STL序列容器包含在3:矢量,deque和list。
如果你过了物理学,你大概是想有矢量as an entity with both大小和方向。不幸的是,名叫矢量class in the theSTL是动态阵列能够of growing你需要包含它的元素。the矢量类允许随机存取to its元素通过操作员[ ],和插入和拆卸元件from the end of the矢量is generally快。
The following程序插入到6数矢量和使用the功重[ ]算子to access them in order to Print them。