Alex Rivera | Logout

Move list element to the end in STL

Asked 2011-02-06T08:37:10.533
44

I have already the list pointer of CDrawObject*

std::list<CDrawObject*> elements;

How I can move some element to the end of list. I see STL Algorithms Reference but i don't find this operations. How i can do it?

Edit
Report

1 Answer

3

A std::list is a doubly-linked list, which means you do not have random access to element n. You have to can remove the element, and then use push_back.

answered 2011-02-06T08:50:56.013

Your Answer