Appendix B. Standard Headers

[ fromfile: standardheaders.xml id: standardheaders ]

This book uses a small subset of the Standard Template Library (STL, also called the Standard Library). The standard header files we use are all listed here. To use these classes and functions effectively, it is useful to know where to look for documentation.

Table B.1.  Standard Headers

Header File Library man pages
  C++ STL  
string STL strings type std::string
sstream stringstream, for writing to strings as if they are streams. std::stringstream
iostream C++ standard stream library std::ios, std::iostream
memory C++ memory-related routines std::bad_alloc, std::auto_ptr
  C Standard Library  
cstring, string.h Functions for C char* strings string, strcpy, strcmp
cstdlib, stdlib.h c Standard Library random, srandom, getenv, setenv
cstdio, stdio.h Standard input/output stdin, stdout, printf, scanf
cassert Assert macros assert

[Note]Note

By default, the C++ Standard Library documentation might not be installed on your system. Search for the string libstdc with your favorite package manager, so you can install something like libstdc++6-4.5-doc.



[89] For examples, see cplusplus.com or Dinkumware.