9.3.1. Adding Elements to a Sequential Container
Excepting array
, all of the library containers provide flexible memory management. We can add or remove elements dynamically changing the size of the container at run time. Table 9.5 (p. 343) lists the operations that add elements to a (nonarray
) sequential container.
When we use these operations, we must remember that the containers use different strategies for allocating elements and that these strategies affect performance. Adding ...
Get C++ Primer, Fifth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.