官术网_书友最值得收藏!

Sequence containers

The STL supports quite an interesting variety of sequence containers. Sequence containers store homogeneous data types in a linear fashion, which can be accessed sequentially. The STL supports the following sequence containers:

  • Arrays
  • Vectors
  • Lists
  • forward_list 
  • deque

As the objects stored in an STL container are nothing but copies of the values, the STL expects certain basic requirements from the user-defined data types in order to hold those objects inside a container. Every object stored in an STL container must provide the following as a minimum requirement:

  • A default constructor
  • A copy constructor
  • An assignment operator

Let's explore the sequence containers one by one in the following subsections.

主站蜘蛛池模板: 仪陇县| 崇明县| 集贤县| 丹东市| 武隆县| 安达市| 上思县| 浑源县| 西峡县| 白河县| 徐汇区| 福贡县| 读书| 赣榆县| 宁都县| 永福县| 合江县| 永福县| 高青县| 黄梅县| 石城县| 绥化市| 德化县| 胶州市| 右玉县| 绥中县| 屏边| 贡嘎县| 炎陵县| 开鲁县| 皮山县| 盐亭县| 缙云县| 澄江县| 临高县| 龙口市| 博湖县| 巫溪县| 安国市| 鄄城县| 乌什县|