They differ when you look at the time/space complexity of the operations. Genenrally, you look at all of the operations you'll be using first, and then you'll choose which container you'll use.
For example, if you need random access by index, you're probably going to want to use a vector. If you are going to be iterating through the items, and add elements in the middle you're going to want to use a list.
Thanks Moschops for that shout out. I was just going to point to that stack overflow answer.
Choosing a good STL container for a given situation is a pretty subtle task, unless it's a trivial problem. I would generally recommend writing your code in a generic way to be able to swap the container type without too much trouble, then use the one that seems the most appropriate (it's usually vector), and test different containers if this code seems to be a bottleneck in your software.
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"