April 2022
Intermediate to advanced
1012 pages
38h 1m
English
arrays, vectors, Ranges and Functional-Style ProgrammingObjectives
In this chapter, you’ll:
Use C++ standard library class template array—a fixed-size collection of related, indexable data items.
Declare arrays, initialize arrays and refer to the elements of arrays.
Use the range-based for statement to reduce iteration errors.
Pass arrays to functions.
Sort array elements in ascending order.
Quickly determine whether a sorted array contains a specific value using the high-performance binary_search function.
Declare and manipulate multidimensional arrays.
Use C++20’s ranges with functional-style programming.
Continue our Objects-Natural approach with a case study using the C++ standard library’s class template vector—a variable-size collection ...
Read now
Unlock full access