O'Reilly logo

Just Enough C/C++ Programming by Guy W. Lecky-Thompson

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

STL Headers

The STL headers are arranged into two groups of files—one for the containers and another for the algorithms. The container class header files have the following naming convention:

<class-name>

Using this convention, you can include the headers in a file by using the line:

#include <vector>

Note that this line specifies the default compiler include search path for the libraries, which should be located in the \include directory or one of its subdirectories. These files have the .h extension, even though it’s not included here.

The STL algorithms can be found in the algorithms.h file, which is included with this code:

#include <algorithms>

Again, its location may vary depending on the compiler setup being used.

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