Push Front Vector CPP
myvector.insert(myvector.begin(), value);
Yucky Yacare
myvector.insert(myvector.begin(), value);
#include <vector>
int main() {
std::vector<int> v{ 1, 2, 3, 4, 5 };
v.insert(v.begin(), 6);
}
int main()
{
list<int> mylist{ 1, 2, 3, 4, 5 };
mylist.push_front(6);
// list becomes 6, 1, 2, 3, 4, 5
}