There's no difference, they're just different names. Includes are handled by the preprocessor, and it doesn't care what names your files have, you can end your headers in .blub
or .ramons_special_header
and it'd make no difference to the compiler (technically speaking the same is true of other source files as well, you could put C++ source code in a .c
file, but there compilers that support multiple different language modes like gcc
may change how they behave by default depending on what you name your files, but most compilers will have settings to override that behaviour anyhow).
The only reason people use different names is because some names are used for special purposes in certain projects (e.g. .hpp
meaning "C++ header" and .h
meaning "C header" in some projects with mixed C and C++ sources), or because some people have their editors configured to treat certain files differently based on name. Beyond that it's just a matter of preference. Some people use file endings like .hh
or .hxx
or .H
, and if you search for it you'll find heated discussions about which name is best.