If you need random access, I might suggest a vector instead. If you are only using sequential access, a list will work.
Look into the function list::remove_if(). That should allow you to specify what "Alien"s to remove based on either postition or health.
Fbody
Posting Maven
2,930 posts since Oct 2009
Reputation Points: 833
Solved Threads: 393
>>If I erase the nodes from the list (using list::erase) will this delete the actual objects themselves, or just the pointers on the list.
It will delete the object, you don't need to worry about freeing the memory any longer.
firstPerson
Senior Poster
3,923 posts since Dec 2008
Reputation Points: 841
Solved Threads: 608