Here you will find several examples of source code intended to illustrate concepts related to the C++ STL. The intent of this page is to help beginning STL programmers with a few complete examples. The makefile is here.
Containers
- list.cc
- Demonstrates several list container concepts including splice.
- vector.cc
- Demonstrates one of the most useful containers in the STL!
- set.cc
- Short demonstration of the set container.
- map.cc
- Demonstrates the map container.
- multiset.cc
- Short demonstration of the multiset container.
Algorithms
- algorithm.cc
- Demonstrates several generic algorithms. (This is a work in progress)
- little_algorithm.cc
- Demonstrates things like swap, min, and max. (This is a work in progress)
- generic.cc
- Example of how to write generic functions to work with STL containers.