   Simple question about std::vector...
  Anybody can explain why inserting element in a middle of vector is bad, and why go instead to std::list?   
  In that case, every element between the insertion point and the end of the vector has to be moved to a new memory location.With a linked-list, no existing elements need to be relocated.How bad this is depends on the cost of copying the items in the vector.   ;  so, with std::vector is slower, than list?   ;  No, depending on your use case std::vector can be faster than std::list and vice-versa. There's a reason both are part of the standard library.   ;  Generally speaking, vectors are faster to iterate through, but slower to insert/delete from the middle.As previous posters have mentioned, inserting an element into the middle of a vector will require that all subsequent elements must first be "shifted" to the right by one spot, which will require fully copying all of them.  However, a linked list handles this sort of operation very quickly, as it just involves manipulating a couple of pointers.On the flip side, iterating through a vector can be very fast, as all of the elements in the vector are stored in a continuous block of memory.  This means that, for example, if you want to iterate though a container and print out all of its elements, you will get better performance out of a vector.There are exceptions to every rule but, as SiCrane mentioned, which container you use will ultimately depend on what you will be using it for.   