Check out example codes for "how to pushback in vector". It will help you in understanding the concepts better.

Code Example 1

myvector = {1, 2, 3, 4, 5};
myvector.push_back(6)

Learn ReactJs, React Native from akashmittal.com