stdafx.h的用途 [英] Purpose of stdafx.h
问题描述
文件 stdafx.h
的用途是什么?预编译头 p>
What is the purpose of the file stdafx.h
and what is meant by precompiled headers?
推荐答案
stdafx.h
/ strong>是一个由
生成的文件。Microsoft Visual Studio IDE向导
描述标准系统
和项目特定包含文件
ever change 。
兼容的编译器(例如,
Visual C ++ 6.0及更高版本)将
预编译此文件以减少
整个编译时间。
stdafx.h
is a file, generated by Microsoft Visual Studio IDE wizards, that describes both standard system and project specific include files that are used frequently but hardly ever change. Compatible compilers (for example, Visual C++ 6.0 and newer) will pre-compile this file to reduce overall compile times.
Visual C ++将
在
之前不编译任何内容 #includestdafx.h
在源文件中,除非编译选项
/Yu'stdafx.h'
未选中(通过
默认);它假设
源中的所有代码都已经编译过,包括那行
已经被编译。
Visual C++ will
not compile anything before the
#include "stdafx.h"
in the source file, unless the compile option
/Yu'stdafx.h'
is unchecked (by
default); it assumes all code in the
source up to and including that line
is already compiled.
http://en.wikipedia.org/wiki/Precompiled_header
这篇关于stdafx.h的用途的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!