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

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.

主站蜘蛛池模板: 舟山市| 梧州市| 卓尼县| 天全县| 卢湾区| 云阳县| 铜山县| 枝江市| 天柱县| 沙河市| 炉霍县| 积石山| 平谷区| 湟中县| 白朗县| 云浮市| 阳高县| 行唐县| 双柏县| 色达县| 锡林浩特市| 宁国市| 奈曼旗| 泸定县| 克东县| 潞城市| 宁武县| 理塘县| 肥乡县| 电白县| 霍林郭勒市| 称多县| 苍山县| 鲜城| 泰兴市| 雷波县| 塔城市| 南靖县| 增城市| 湟中县| 广宗县|