Making and Using STL Objects

Read Chapter 2 for an introduction to basic STL classes and their application.

Your first C++ program

Running the compiler

After downloading and unpacking the book's source code, find the program in the subdirectory CO2. Invoke the compiler with Hello.cpp as the argument. For simple, one-file programs like this one, most compilers will take you all the way through the process. For example, to use the GNU C++ compiler (which is freely available on the Internet), you write:

g++ Hello.cpp

Other compilers will have a similar syntax; consult your compiler’s documentation for details.