vector Notes

vector Note:

        If you add elements, but vector capacity (a capacity, not the size, capacity is larger than the size, will advance multi-allocate space) is not enough, the system will re-allocate some memory, then the original contents of all copies of the past, and then delete the original Content. So, if you set a pointing vector of pointers, or iterators, after you add an element, the pointer (iterator) need to be recalculated .

Guess you like

Origin www.cnblogs.com/Stephen-Qin/p/11537385.html