vector pointer locations guaranteed?

前端 未结 7 1698
无人及你
无人及你 2021-01-05 01:05

Suppose I have a vector of ints,

std::vector numbers;

that is populated with a bunch of values, then I say do this (where an ent

7条回答
  •  情话喂你
    2021-01-05 01:33

    Once you changed the capacity of the vector, the data was copied to another memory block, and the origin data is deleted.

提交回复
热议问题