Hi,
I just cant find the "pop" function in list class.
Anyway to do it? or I should write it myself
irr::core::list
There is no popback function like in stl::vector or in irrlicht array. To delete the last element of the list, just use the iterator and get the last element, then delete it.
Delete simply remove the pointed value from the iterator, and the erase function remove the element i from the list.
Code: Select all
list<T*>::Iterator i = MyList.end();
delete (*i);
MyList.erase(i);
#include <Iyad.h>