Headers usually contain:
* An inclusion guard to prevent errors.
* Inclusion of other headers that contain declarations that the ones in it require (for example, a header that declares a function that returns an std::string would #include <string>).
* Declarations necessary by all files that include it.
Following my previous example, a header could look like this:
1 2 3 4 5 6 7 8 9 10 11
//Necessary inclusions:
#include <string>
//Inclusion guard. It will prevent the same header from being included twice in
//the same file:
#ifndef EXAMPLE_H
#define EXAMPLE_H
//Definitions:
std::string some_function();
#endif