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

Code Example 1

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

Code Example 2

vector_name.push_back(element_to_be_added);

Learn ReactJs, React Native from akashmittal.com