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?
Explanation
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
Cosmo
Sign Up Now
or Subscribe for future quizzes