A header file (e.g. .h
) describes the classes that are declared in the file with an overview of what they are for and how they are used.
In other words, it's documentation for the user of the library.
A body file (e.g. .cpp
) should contain more information about implementation details or discussions of tricky algorithms.
In other words, it's documentation for the maintainer.