vector Res@iz
does vector.resize(size+1) preserve the elements it have and add just 1 uninitialized slot or it reallocates everything so the 'so-far-stored-data` is lost?
TH@Nks AlOTs
yuoRs FaiThFuLLy hi Hi and bye ByE
It adds one initialized element to the end of the vector, though it may force a reallocation which causes iterators, pointers and references to be invalidated. However, the value of those elements are preserved.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement