Search code examples
clion

Set CLion to use .hpp header, rather than .h header when creating a new C++ class?


Using the context menu, I can easily create a .cpp and a header file in CLion by right clicking and new > C++ Class.

The header file has a .h extension. How do I make .hpp the default header extension?


Solution

  • Right click and select new > C++ Class.

    Click the settings icon next to the type drop down box:

    enter image description here

    Select the desired header extension:

    enter image description here