Lines 14–15 create two vector
objects that store values of type int
—integers1
contains seven elements, and integers2
contains 10 elements. By default, all the elements of each vector
object are set to 0
. Like array
s, vector
s can be defined to store most data types, by replacing int
in vector<int>
with the appropriate type.