vector Member Function size; Function outputVector

Line 18 uses vector member function size to obtain the size (i.e., the number of elements) of integers1. Line 20 passes integers1 to function outputVector (lines 96–102), which uses a range-based for statement to obtain the value in each element of the vector for output. As with class template array, you can also do this using a counter-controlled loop and the subscript ([]) operator. Lines 23 and 25 perform the same tasks for integers2.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.253.55