7.13. Wrap-Up
This chapter
began our introduction to data structures, exploring the use of arrays and
vectors to store data in and retrieve data from
lists and tables of values. We showed how to declare, initialize and refer to
individual elements of an array. We also illustrated how to pass arrays to
functions and how to use the const
qualifier. We presented basic searching and sorting techniques. You saw how to
declare and manipulate multidimensional arrays. Finally, we demonstrated C++
Standard Library class template vector, which
provides a more robust alternative to arrays.
We continue our coverage of data
structures in Chapter
14, Templates, where we build a stack class template. Chapter
20, Standard Template Library (STL), introduces
several of the C++ Standard Library's predefined data structures, which you can
use instead of building your own. Chapter
20 presents more of class template vector and discusses additional
data structure classes, including list and deque—array-like data structures that can grow and shrink in
response to a program's changing storage requirements.
We have now introduced the basic
concepts of classes, objects, control statements, functions and arrays. In Chapter
8, we present one of C++'s most powerful
features—the pointer. Pointers keep track of where data and functions are stored
in memory, which allows us to manipulate those items in interesting ways. After
introducing basic pointer concepts, we examine in detail the close relationship
among arrays, pointers and strings.