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

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.

主站蜘蛛池模板: 板桥市| 清河县| 东乡县| 巫溪县| 于田县| 忻城县| 涿州市| 罗源县| 阿合奇县| 博兴县| 泌阳县| 南阳市| 平陆县| 慈溪市| 佳木斯市| 新乡市| 贡嘎县| 辛集市| 乐山市| 永仁县| 黄陵县| 崇信县| 申扎县| 淮南市| 大厂| 抚宁县| 会泽县| 大渡口区| 项城市| 伊春市| 额尔古纳市| 平利县| 缙云县| 滦南县| 洪江市| 廊坊市| 溆浦县| 琼结县| 花莲市| 太仓市| 山丹县|