7 Class Templates array and vector; Catching Exceptions

Objectives

In this chapter you’ll:

  • Use C++ Standard Library class template array—a fixed-size collection of related data items.

  • Declare arrays, initialize arrays and refer to the elements of arrays.

  • Use arrays to store, sort and search lists and tables of values.

  • Use the range-based for statement.

  • Pass arrays to functions.

  • Use C++ Standard Library function sort to arrange array elements in ascending order.

  • Use C++ Standard Library function binary_search to locate an element in a sorted array.

  • Declare and manipulate multidimensional arrays.

  • Use one- and two-dimensional arrays to build a real-world GradeBook class.

  • Use C++ Standard Library class template vector—a variable-size collection ...

Get C++ How to Program, 10/e 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.