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

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Sign Up Now
or Subscribe for future quizzes