MSDN介绍:

  These files are used to build a precompiled header file Projname.pch and a precompiled types file Stdafx.obj.

  These files are located in the Projname directory. In Solution Explorer, Stdafx.h is in the Header Files folder, and Stdafx.cpp is located in the Source Files folder.

File name

Description

Stdafx.h

An include file for standard system include files and for project-specific include files that are used frequently but are changed infrequently.

You should not define or undefine any of the _AFX_NO_XXX macros in stdafx.h; see the Knowledge Base article "PRB: Problems Occur When Defining _AFX_NO_XXX". You can find Knowledge Base articles in the MSDN Library or at http://search.support.microsoft.com/.

Stdafx.cpp

Contains the preprocessor directive #include "stdafx.h" and adds include files for precompiled types. Precompiled files of any type, including header files, support faster compilation times by restricting compilation only to those files that require it. Once your project is built the first time, you will notice much faster build times on subsequent builds because of the presence of the precompiled header files.

  1:stdafx用于提高编译速度。如果不生成预编译头文件,每次编译器会编译所有cpp。然而,那些“频繁使用但改变很少的”文件不需要多次编译。为了提高编译速度,对这些文件使用预编译,编译器不需要多次重复编译。

  2:预编译生成的文件为Projname.pch和Stdafx.obj。

  3:不要使用_AFX_NO_XXX这样的宏定义。

  4:stdafx.h文件应放在cpp的第一行。在stdafx.h文件前面的所有代码将被忽略掉。(From百度百科等其他资料)

stdafx文件介绍的更多相关文章

  1. Linux core 文件介绍

    Linux core 文件介绍 http://www.cnblogs.com/dongzhiquan/archive/2012/01/20/2328355.html 1. core文件的简单介绍在一个 ...

  2. linux设备驱动程序该添加哪些头文件以及驱动常用头文件介绍(转)

    原文链接:http://blog.chinaunix.net/uid-22609852-id-3506475.html 驱动常用头文件介绍 #include <linux/***.h> 是 ...

  3. Android下HelloWorld项目的R.java文件介绍

    R.java文件介绍 HelloWorld工程中的R.java文件 package com.android.hellworld; public final class R {     public s ...

  4. APK扩展文件介绍、功能及用法

    APK扩展文件介绍 Android Market (Google Play Store)中每一个APK文件的最大限制是50MB.假设您的程序中包括大量的数据文件,曾经您仅仅能把这些数据文件放到自己的s ...

  5. NSIS文字及字符串函数与头文件介绍

    原文 NSIS文字及字符串函数与头文件介绍 文字函数,顾名思义就是处理字符串的函数.使用这些字符串函数前,必须先包含头文件WordFunc.nsh.该头文件目前包含如下一些函数:WordFind.Wo ...

  6. opensslBIO系列之2---BIO结构和BIO相关文件介绍

    BIO结构和BIO相关文件介绍     (作者:DragonKing Mail:wzhah@263.net 公布于:http://gdwzh.126.com openssl专业论坛)          ...

  7. 微信小程序-01-项目组成文件介绍(入门篇)

    自古开篇先说两句,写这些笔记不是学习用的,主要是后续分享一些遇到的坑,碰到过什么样的问题,怎么去解决,如果你不是一个很耐心无看文章的人,建议去 网易云课堂找一些课程,跟着别人的脚步或许会更有动力,我的 ...

  8. IOS-项目中常见文件介绍

    一.项目文件结构示意图 二.文件介绍 1.products文件夹:主要用于mac电脑开发的可执行文件,ios开发用不到这个文件 2.frameworks文件夹主要用来放依赖的框架 3.test文件夹是 ...

  9. Linux文件介绍

    Linux文件介绍 Linux 文件属性 可以通过命令ll+文件名,查看文件的具体属性 例如:ll syz.gz 1736706 -rw-r--r--. 1 root root 28 Oct 27 1 ...

随机推荐

  1. hdu_5826_physics(物理题)

    题目链接:hdu_5826_physics 题意: 给你一些点的速度和初始位置,还有方向,这些速度和加速度满足v*a=c,然后又q个询问,问第t秒第K小的速度是多少 题解: 将物理公式转换为v与t的关 ...

  2. 如何判断网页中引入jquery

    直接上代码,不信自己测. <html xmlns="http://www.w3.org/1999/xhtml"><meta http-equiv="Co ...

  3. 安装unbuntu系统后改回windows引导的方法

    1.安装EasyBCD 2.点BCD部署 3.分区:选c盘 4.点击编写MBR 5.点编辑引导菜单 6.确定win10后们的是有勾 7.点击保存设置

  4. java innerclass

    ---恢复内容开始--- 内部类: public class Inner{ public class Inner2{} } 创建内部类对象 .new public class Test {    in ...

  5. FreeMarker 实例

    1.jar包:freemarker-2.3.19.jar,将jar拷贝到lib目录下: 2.新建Web项目:TestFreeMarker 在web目录下新建ftl文件夹: 在ftl下新建模版文件ftl ...

  6. A框架 第三步 先加载父类,如果加载子类.立马报错.里面继承的父类还没有导入

    先导入  超级父类 如object.php ----controller.php 框架文件中 后导入  当前请求的controller的抽象父类(controller_abstract) 最后  导入 ...

  7. Eclipse中配置weka,以及添加算法

    Eclipse中配置weka 1 找到weka的安装位置,寻找weka的压缩文件weka-src.jar,将压缩文件解压,解压出的文件夹weka-src. 2 打开Eclipse,新建Java pro ...

  8. greatest common divisor

    One efficient way to compute the GCD of two numbers is to use Euclid's algorithm, which states the f ...

  9. Spring security 获取当前用户

    spring security中当前用户信息 1:如果在jsp页面中获取可以使用spring security的标签库 在页面中引入标签   1 <%@ taglib prefix=" ...

  10. "Debugging not possible in single session mode"

    PLSQL  Developer在测试存储过程,遇到"Debugging not possible in single session mode" 解决办法: 点击菜单栏" ...