Question
The following statement defines a vector of ints named v. Write a statement that defines a const_iterator named cit, and initializes it to point to the first element in v.vector<int> v = {1, 2, 3, 4, 5};
Step 1
Since we want a `const_iterator`, we will use the `const_iterator` type provided by the `vector` class. Show more…
Show all steps
Your feedback will help us improve your experience
Watch the video solution with this free unlock.
EMAIL
PASSWORD