Is it possible to ensure the continuity (integrity) of the memory block allocated for an object of type vector if no more than n new push_back() / insert() operations are planned?
Before starting the operations of increasing the elements of the vector, you need to call the reserve(n) method to expand its memory to the required size
Войдите чтобы поставить Нравится
Войдите чтобы прокомментировать