A Tour of the Standard Library
Why waste time learning when ignorance is instantaneous?
Hobbes
3.1 Introduction
No significant program is written in just a bare programming language. First, a set of supporting libraries are developed. These then form the basis for further work.
Continuing Chapter 2, this chapter gives a quick tour of key library facilities to give you an idea what can be done using C++ and its standard library. Useful library types, such as string, vector, list, and map, are presented as well as the most common ways of using them. Doing this allows me to give better examples and to set better exercises in the following chapters. As in Chapter 2, you are strongly encouraged not to be distracted or discouraged by an incomplete understanding of details. The purpose of this chapter is to give you a taste of what is to come and to convey an understanding of the simplest uses of the most useful library facilities.
The standard library facilities described in this book are part of every complete C++ implementation. In addition to the standard C++ library, most implementations offer ''graphical user interface'' systems, often referred to as GUIs or window systems, for interaction between a user and a program. Similarly, most application development environments provide ''foundation libraries'' that support corporate or industrial ''standard'' development and/or execution environments. I do not describe such systems and libraries. The intent is to provide a self-contained description of C++ as defined by the standard and to keep the examples portable, except where specifically noted. Naturally, a programmer is encouraged to explore the more extensive facilities available on most systems, but that is left to exercises.