Morgoth
Morgoth

Reputation: 5184

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?

Upvotes: 3

Views: 5851

Answers (2)

Antonio
Antonio

Reputation: 20306

Settings->Editor->Code Style->C/C++->Tab "New File Extensions" and then:

enter image description here

Upvotes: 0

Morgoth
Morgoth

Reputation: 5184

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

Upvotes: 6

Related Questions