Chapter 8. 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.

  • To create and use managed arrays with C++/CLI.

Outline

 

8.1

Introduction ...

Get Visual C++ 2008: How to Program, Second Edition now with O’Reilly online learning.

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