Array of Vectors in C++ STL

Array of Vectors in C++ STL

In this article, we will learn about Array of Vectors in C++ STL with C++ code snippets. Before getting started with array of vectors we should know about the arrays and vectors in C++.

Array:-

An array is a collection of elements of the same datatype and these elements are stored in contiguous memory locations.We cannot change the size of array once we have declared it.

Creating an Array:
The syntax for declaring an array is:

data_type array_name[array_size];

For example:

int marks[10]; //mark...
 •  0 comments  •  flag
Share on Twitter
Published on October 21, 2022 10:16
No comments have been added yet.