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
I also have a way... Not so good tho..
This looks like @0xPwn's solution, but he didn't reverse the vector the second time. You will probably understand this code, so i will not explain it.
#include
#include
template
void pop_front(std::vector& vec){
std::reverse(vec.begin(),vec.end()); // first becomes last, reverses the vector
vec.pop_back(); // pop last
std::reverse(vec.begin(),vec.end()); // reverses it again, so the elements are in the same order as before
}