I\'m using some classes and several utility methods that use std:: vector.
Now I need to use each frame a pop_front - push_back method on one of those classes (but they
if you just try to erase the first element then in the function use:
if (my_vector.size()){ //check if there any elements in the vector array
my_vector.erase(my_vector.begin()); //erase the firs element
}
if you want to emulate pop front for the entire vector array ( you want to keep pop out every element from start to end) , i suggest on:
reverse(my_vector.begin(),my_vector.end()); // reverse the order of the vector array
my_vector.pop_back(); // now just simple pop_back will give you the results