What Is a Vector?
In this lesson, we’ll be learning about 1D and 2D vectors.
We'll cover the following
Introduction to vectors
In C++, a vector is a dynamic array that can resize itself automatically when elements are added or removed. Vectors are part of the Standard Template Library (STL) and offer a convenient way to work with collections of data.
Including the vector library
To use vectors in your C++ program, include the <vector>
header file:
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.