Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
Header files contain the declarations of functions and classes.
Header files commonly have the .h and .hpp filename extensions.
To use a header file, it must be #included in the source code.
#include <iostream> |
A complete collection of header files is called a library. The C++ standard library is called the STL.
The combination of a header (.h) file and an implementation (.cpp) file is called a unit.
Make header files self-sufficient [1].
Always write interal #include guards [2]. Never write external #include guards [2] (but compare [8], which suggest to do write external #include guards).
From [5]:
//Code copied from: |
The STL consists out of the following header files [3][4]:

algorithm
array
atomic
bitset
cassert
ccomplex
cctype
cerrno
cfenv
cfloat
chrono
cinttypes
ciso646
climits
clocale
cmath
codecvt
complex
condition_variable
csetjmp
csignal
cstdalign
cstdarg
cstdbool
cstddef
cstdint
cstdio
cstlib
cstring
ctime
complex
ctgmath
ctime
cuchar
cwchar
cwctype
deque
exception
forward_list
fstream
functional
future
initializer_list
iomanip
ios
iosfwd
iostream
istream
iterator
limits
list
locale
map
memory
mutex
new
numeric
ostream
queue
random
ratio
regex
set
sstream
stack
stdexcept
streambuf
string
strstream
system_error
thread
tuple
typeindex
typeinfo
type_traits
utility
valarray
vector
unordered_map
unordered_set
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.