Function inputVector

Lines 29–30 pass integers1 and integers2 to function inputVector (lines 105–109) to read values for each vector’s elements from the user. The function uses a range-based for statement with a range variable that is a reference to an int to form lvalues that are used to store the input values in each vector element.

Get C++11 for Programmers, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.