hello can I keep track of objects in a list and being able to sort them by there z var ?
do I use pointers ?
how would I do this ?
#include <vector>
vector<sometype> _objects_;
create_object(object_type)
{
new object_type myobject;
_objects_.push_back(myobject);
return _objects_.at(list_end);
}
remove_object(int pos)
{
delete *_objects_.at(pos);
_objects_.erase(pos);
}
sort_object_list()
{
object_list.sort(object.z);
}