It can be wasteful to double a vector’s size when more space is needed. For example, a full vector of 1,000,000 elements resizes to accommodate 2,000,000 elements when a new element is added, leaving 999,999 unused elements. You can use ______ and to __________ control space usage better.
Fill in the blank(s) with the appropriate word(s).
resize, reserve
Computer Science & Information Technology
You might also like to view...
The code for a template function is generated when:
a) The function template declaration (prototype) appears in the C++ program. b) The function template is encountered in the C++ program. c) The function call is encountered in the C++ program d) At runtime, when the function call is executed.
Computer Science & Information Technology
Microsoft recommends that every regular user have a(n) _____ account on the computer he or she uses.
A. Administrator B. Standard C. SkyDrive D. Microsoft
Computer Science & Information Technology