Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set default header file extension in Visual Studio 2013?

Every time I create headers I have to manually rename their extensions from .h to .hpp.

And when I create C++ Projects with wizards, header files get created with the .h extension.

Is there any way to change C++ Headers' default file extension in Visual Studio 2013?

I know, it's a matter of personal preference, but I want to do it anyway.

like image 696
iFarbod Avatar asked Nov 09 '22 18:11

iFarbod


1 Answers

The Visual Studio world uses ".h" extension, that's just the way it is and it makes no difference whatsoever the extension you use. They all become part of your ".cpp" files anyway when the are "included", they are literally copied in in-place of the "#include" line when the compiler runs. They can have any extension at all. It also doesn't matter if the source files are ".c" or ".cpp", the compile mode is set in the project properties, and will be C++ unless you deliberately change it, which would render most of the SDK unusable anyway.

like image 57
Paul Avatar answered Nov 15 '22 04:11

Paul