Quote:
Originally posted by oktronic
But besides all this, since vector is indeed reallocating its entire memory block each time, then wouldn't that be horribly inefficient? As I said before, data streams, such as a character array, rarely give you their size first, they usually have a terminator, such as a string has a NULL and a file an EOF.
...
So I'll add another negative to STL, horrible memory management using shifting contiguous memory for allocation forcing the system to keep shifting memory around to compensate.
Why would std::vector need to reallocate memory every time if it really a linked list?