Learning C++: The STL and the vector Class

Mike McMillan
Level Up Coding
Published in
7 min readApr 10, 2020

--

The most popular container in the Standard Template Library is the vector class. The vector is quickly becoming the container of choice for all C++ programs when a sequential ordering of data is needed. Most C++ programming experts (and C++ textbook authors) recognize that the vector has better flexibility than the primitive array and, for all but the most data-intensive scenarios, vectors are efficient enough for most applications.

In this article I’ll discuss how to use the vector class for sequential data storage.

--

--

Mike McMillan writes about computer programming and running. See more of his writing and courses at https://mmcmillan.gumroad.com.