I need to insert values into the beginning of a std::vector
and I need other values in this vector to be pushed to further positions for example: something added to beginning of a vector and values moved from position 1 to 2, from 2 to 3 etc.
How can I do that?
std::deque
), or use other tricks (e.g. if you only add and remove stuff at the front, just do that at the end and display it in reverse).