add in front of vector c++ code example
Example 1: adding element in vector c++
vector_name.push_back(element_to_be_added);
Example 2: vector push front insert()
auto it = vec.insert(vec.begin(), 3);
vector_name.push_back(element_to_be_added);
auto it = vec.insert(vec.begin(), 3);