Jump to content

Stdafx.h

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 66.25.144.125 (talk) at 03:49, 19 April 2006 (explain stdafx name; clean-up). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

stdafx.h is commonly used in Windows computer programming as the name of a file which describes include files (both standard system include files and project specific include files) that are used frequently but are changed infrequently. In a project most C/C++ source files refer to the stdafx.h file.

Since often near to all C/C++ source files include stdafx.h, making small changes in it means the entire project needs to be recompiled and small errors in it cause large errors in the rest of the project.

Many compilers (for example, Microsoft Visual Studio) will precompile this file to reduce compile times.

The AFX in stdafx.h stands for Application Framework with the X standing for either eXtensions or simply because the letter X is a cool letter. AFX was the original abbreviation for the Microsoft Foundation Classes (MFC).

This type of file can have alternate names including "StdInclude.h".