Chapter 6. arrays, vectors, C++20 Ranges and Functional-Style Programming

Images

Objectives

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 or descending order.

Quickly locate an element in a sorted array using the high-performance binary_search function.

Declare and manipulate multidimensional arrays.

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.