Fleck
Fleck

Reputation: 133

Visual Studio 2015 Header File Generation

Microsoft thinks it is helpful to add

 #pragma once

to the top of all header files it generates. It does not seem to be a template, how can this be disabled.

I don't care about overriding to have some other template or whatever in it's place. I just want a blank document when I ask for one. Every visual studio version I've installed and used before has done this automatically. My first use of VS 2015 is my first encounter with this issue.

Upvotes: 1

Views: 543

Answers (1)

Fleck
Fleck

Reputation: 133

The .h and .cpp files both have a default template file they use when creating a new document.

The text in these documents will copy into the newly generated h and cpp files, respectively:

$InstallPath$\VC\vcprojectitems\hfile.h

and

$InstallPath$\VC\vcprojectitems\newc++file.cpp

Example file path I use: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcprojectitems

Upvotes: 1

Related Questions