When developing C/C++ projects in Visual Studio, you may use precompiled headers to speed up compilation.

One of these header files includes all the other ones which are frequently used by the project but rarely modified. This file is usually named StdAfx.h.

The mechanism of precompiled headers is quite unobvious and has a number of subtleties to it. For instance, the StdAfx.h file must be the first one to be included into the *.cpp file.

Andrey Karpov has described in detail how to use precompiled headers and related nuances in the article "stdafx.h for Novices".

Although there is the word "novices" in the title, this article is really very interesting and useful. Even experienced developers have found something new and left positive feedback on it. So we urgently recommend you to read it - then StdAfx.h will turn from the file you constantly fight against into the file that really helps.


Bugs Found

Checked Projects
Collected Errors
14 526
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site. Learn More →