Chapter 6. array
s, vector
s, C++20 Ranges and Functional-Style Programming
Objectives
In this chapter, you’ll:
■ Use C++ standard library class template array
—a fixed-size collection of related, indexable data items.
■ Declare array
s, initialize array
s and refer to the elements of array
s.
■ Use the range-based for
statement to reduce iteration errors.
■ Pass array
s to functions.
■ Sort array
elements in ascending or descending order.
■ Quickly locate an element in a sorted array
using the high-performance binary_search
function.
■ Declare and manipulate multidimensional array
s.
■ Use C++20’s ranges with functional-style programming.
■ Continue ...
Get C++20 for Programmers, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.