Orion Lawlor's Short STL Examples

These short examples illustrate the syntax and features of the C++ standard template library.
cout.cpp Shows how to use std::cout.
cout_manip.cpp Shows how to use std::ostream "manipulator" objects.
cout_method.cpp Shows how to use std::ostream formatter methods.
find.cpp Shows how to use std::find.
find_first_of.cpp Shows how to use std::find_first_of.
find_if.cpp Shows how to use std::find_if.
for_each.cpp Shows how to use std::for_each.
istringstream.cpp Shows how to use std::istringstream.
map.cpp Shows how to use std::map.
o_for_each.cpp Shows how to use std::for_each (with a function object).
ofstream.cpp Shows how to use std::istringstream.
ostringstream.cpp Shows how to use std::ostringstream.
streambuf_i.cpp Shows how to implement a simple std::streambuf for input. The other way to do this is use the "stupid-named pointers" method, described in truly excruciating detail here: http://www.mr-edd.co.uk/?p=16
streambuf_o.cpp Shows how to implement a simple std::streambuf for output. The other way to do this is use the "stupid-named pointers" method, described in truly excruciating detail here: http://www.mr-edd.co.uk/?p=16
Created by Orion Sky Lawlor, olawlor@acm.org, 2008-10-13
Placed in the public domain (download)
Back to
My Home Page