7 Arrays

It is a capital mistake to theorize before one has data.

SIR ARTHUR CONAN DOYLE, Scandal in Bohemia (Sherlock Holmes)

Introduction

An array is used to process a collection of data all of which is of the same type, such as a list of temperatures or a list of names. This chapter introduces the basics of defining and using arrays in C++ and presents many of the basic techniques used when designing algorithms and programs that use arrays.

Prerequisites

This chapter uses material from Chapters 2 through 6.