1

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.

Fleck
  • 133
  • 1
  • 11
  • possible duplicate of [Override #pragma once with standard #ifndef MS-VC++](http://stackoverflow.com/questions/6566595/override-pragma-once-with-standard-ifndef-ms-vc) – dhh Aug 26 '15 at 17:21
  • It may be a duplicate, however the answer provided is a bit extreme. I spent some more time and found a simple solution and posted below. – Fleck Aug 26 '15 at 19:14

1 Answers1

1

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

Fleck
  • 133
  • 1
  • 11