B4Coder
0%
LessonAbout 5 min

Chapter 5 · Lesson 4 of 5

04. The range-based for

for (int x : nums) visits every value in a vector or array, with no index to count. Shorter, and no way to run off the end.

Opening the lesson…