Original Post
i''m using a stl list, and the way im deleting objects is:
packet is a std::list and
iter is std::list::iterator
as you can see, this doesnt exactly look like the most efficient way to delete items from my list, using find() wont work because it uses structs, anybody have any ideas?
for (iter = packet.begin(); iter != packet.end(); ++iter)
{
if (iter->data == "world") break;
}
packet.erase(iter);
|