7. Class Templates array and vector; Catching Exceptions
Now go, write it before them in a table, and note it in a book.
—Isaiah 30:8
Begin at the beginning, ... and go on till you come to the end: then stop.
—Lewis Carroll
To go beyond is as wrong as to fall short.
—Confucius
Objectives
In this chapter you’ll:
• Use C++ Standard Library class template array
—a fixed-size collection of related data items.
• Use array
s to store, sort and search lists and tables of values.
• Declare array
s, initialize array
s and refer to the elements of array
s.
• Use the range-based for
statement.
• Pass array
s to functions.
• Declare and manipulate multidimensional array
s.
• Use C++ Standard Library class template vector
—a variable-size collection of related data ...
Get C++ How to Program, Ninth 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.