std::vector explained with simple example

Vector in C++ are part of Standard Library Container Classes which basically has the functionality of dynamic array which are flexible in size.
C++ STL provides a template class definition for Vectors which are very efficient, refined, and easy to use.
It also has lots of very useful member functions which can be used directly in programs for faster implementation.

Let’s have a look into std::vector class template definition.

template <class T, class Allocator = allocator<T>> class vector
where T = data type that is being stored and allocator defines the allocator functions.
(more…)
std::vector explained with simple example Read More