what's the difference between hpp and hxx?

In C++, the file extension doesn't actually matter. The use of .h, .hpp, .hxx, or no file extension are all by convention.

The standard library uses no file extension for its header files. Many projects, including Boost, use .hpp. Many projects use .h. Just pick one and be consistent in your project.


The compiler doesn't distinguish between the two extensions, so technically it doesn't matter which one you use. Personally I use the .hxx extension for header files that are only used internally in the project, and .hpp for those that should be release with the library/software.

Tags:

C++