   STL crash course
  I've coded up 8 different linked lists with all their own member functions and stuff for my game.  Anyway now I need to make another one and I'm deciding it's time I finally learned how to use the STL.  I was looking at <vector> and <list> but I can't really tell the difference for my purposes.  I basically want an array of structs that can grow and shrink and it looks like they both do that in their own way.  I don't know which one to use.If I was making my own linked list, I know how it would work.  I wouldn't need to access a certain element ever.  I would have a Reset() function to put a pointer at the head of the list.  And then I would need to check each Node against something else and possibly delete it one by one sequentially until I reach the end of the list.  I mean list[5] or list[4] to get an element is something I won't need.  So I guess I should go with <list>?  Or does it even matter?   
  If you want a linked list, you probably want std::list. You could use std::vector, and you can erase any elements from any position in the vector, but it's not very efficient (It requires all subsequent items to be copied "down one" to fill the hole).If you don't need the list to be in any particular order, you can use std::vector and swap an element with the last element and then pop_back() to get fast erasure of elements in the middle of the vector.Basically:If you need random access, and you need to insert or erase only at the end of the container, std::vector is a good choice.If you need random access, and you need to insert or erase anywhere, std::map or std::set is a good choice.If you don't need random access, std::list is a good choice.;  I don't think I'll ever be checking a certain Node.  It looks like I'm going to be starting at the head of the list every time, checking each one and knocking a few out as I go.  So std::list I guess.  std::map, std::set?  Man, it never stops.  One of these days I'll finally have learned everything.   ;  Holy crap std::list looks easy.  Why did I put off learning the STL for so long.  Oh well at least I know pointers   ;This might be useful, in particular the flow diagram.