Vector is a sequence container that can store elements, but its size can change dynamically (C/C++ array’s size do not change dynamically). Container is a objects that hold data of same type. Sequence containers store elements strictly in linear sequence. We can store int, string, float elements, depending on how we initialize the vector.
Read this article to understand Vector in C++ in depth
Have a doubt or thought? Join the discussion now
This is a companion discussion topic for the original entry at http://iq.opengenus.org/vector-cpp/