Check out example codes for "c++ how to add something at the start of a vector". It will help you in understanding the concepts better.

Code Example 1

#include <vector>

int main() {
    std::vector<int> v{ 1, 2, 3, 4, 5 };
    v.insert(v.begin(), 6);
}

Learn ReactJs, React Native from akashmittal.com