2
votes

I'm working off of a branched project in VS2015, and every time I create a new class file from the default template, it adds #include "stdafx.h" by default. The solution does not use precompiled headers, and has no such file.

It appears the project was originally created with the precompiled header option enabled, and it was disabled afterwards. Is there a way to stop this line from being added to new files that are created with the default class template?

For the record, in the properties, under C/C++ -> Precompiled headers:

Precompiled Header:              "Not using Precompiled Headers"
Precompiled Header File:         <blank>
Precompiled Header Output File:  <blank>
1

1 Answers

0
votes

generation of class structure is not managed by a single project. Even though you changes your project properties to "Not Supported" pre compile header files this will not help to stop creation of .CPP file with stdafx.h support.

To customise your class creation wizard you have to modify "default" file present at "C:\Program Files\Microsoft Visual Studio 14.0\VC\VCWizards\CodeWiz\Generic\Class\Scripts\1033" location.

Following are certain examples resides on stackoverflow and MSDN for your reference.