Adding objects to the front of a vector

Is there an easy way to add objects to the front of a vector? I know that myvector.push_back(myobject) will add myobject to the back of myvector. Is there a similar function that will add it to the front?
You can use insert.... but.... adding to the front of a vector is very expensive because vector has to move ALL the data over to add additional space.

If you need to add to the front and back, consider using a deque instead.
Thanks, I've never really used any of the STL containers besides the vector so far. I'll look into deque.
Topic archived. No new replies allowed.