Check out example codes for "adding element in vector c++". It will help you in understanding the concepts better.

Code Example 1

vector_name.push_back(element_to_be_added);

Code Example 2

std::vector<int> v;
v.push_back(10);

Learn ReactJs, React Native from akashmittal.com