O'Reilly logo

C++ How to Program, Sixth Edition by H. M. Deitel - Deitel & Associates, Inc., P. J. Deitel - Deitel & Associates, Inc.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Arrays and Vectors

 

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 learn:

  • To use the array data structure to represent a set of related data items.

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

  • To declare arrays, initialize arrays and refer to the individual elements of arrays.

  • To pass arrays to functions.

  • Basic searching and sorting techniques.

  • To declare and manipulate multidimensional arrays.

  • To use C++ Standard Library class template vector.

Outline

7.1

Introduction

7.2

Arrays

7.3

Declaring Arrays

7.4

Examples Using ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required