Control Structures in C++: Range-based for Loops
C++
| Intermediate
- 14 videos | 1h 37m 12s
- Includes Assessment
- Earns a Badge
One of the many differences between modern C++ and classic C++ is the presence of range-based for loops. These were added to the standard in C++11 and allow for loops to iterate easily over a container and reduce the risk of off-by-one errors. They also eliminate the need for an integer index variable to index into a container. Start this course by reviewing how for loops work to iterate over arrays. Create arrays with different numbers of dimensions and iterate over the dimensions using nested for loops. Discover how to use containers from the standard template library to experiment with maps and vectors. Explore the use of the cbegin(), cend(), rbegin(), rend(), crbegin(), and crend() functions. Finally, use range-based for loops and explore the use of the debugger in this context. You will also note the important differences between value type loop variables in for loops and reference type variables.
WHAT YOU WILL LEARN
-
Discover the key concepts covered in this courseIterate over arrays using for loopsCreate string arrays and use break and continueCreate multidimensional arrays and iterate over themRecall the offerings of the standard template libraryAccess out-of-bound elements and create iteratorsSearch for an element in a vector through templates
-
Use the cend(), rend(), and crend() functionsBuild and debug codeDebug code using a buildWalk through code using a debuggerContrast strings and string referencesUse maps and range-based for loopsSummarize the key concepts covered in this course
IN THIS COURSE
-
2m 7s
-
8m 38s
-
5m 50s
-
7m 10s
-
9m 38s
-
7m 2s
-
6m 17s
-
9m 13s
-
8m 48s
-
5m 45s
-
9m 27s
-
6m 15s
-
7m 57s
-
3m 6s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.
Digital badges are yours to keep, forever.