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.

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

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

• Use the range-based for statement.

• Pass arrays to functions.

• Declare and manipulate multidimensional arrays.

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

Get C++11 for Programmers, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.