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. Mysql字符集修改为UTF8

    修改/etc/my.cnf,这个文件是安装的时候拷贝过去的 修改方法: [client]下添加 default-character-set=utf8 [mysqld]下添加 character-set ...

  2. CABasicAnimation 几种停止的回调

    一.编写一个简单的动画,使一个UIview从屏幕的左上角移动到左下角,间隔时间3S // // ViewController.m // CAAnimationTest // // Created by ...

  3. Objetive-C +load方法研究

    load方法的执行时机           Objetive-C 的runtime会在一个类的所有方法加载到内存中时调用这个类的+load() 方法,因为每个类的方法只是加载一次,所以每个+load( ...

  4. IOS 类的属性修饰符atomic

    在声明一个类的属性时,默认这个属性会被修饰atomic,意思是原子性访问的. nonatomic和atomic修饰的属性,在自己没有重写setter和getter的时候才会发生作用,其主要的作用可以理 ...

  5. kettle连接mysql

    kettle连接mysql时出现问题

  6. [转]详细的mysql时间和日期函数

    这里是一个使用日期函数的例子.下面的查询选择了所有记录,其date_col的值是在最后30天以内: mysql> SELECT something FROM table WHERE TO_DAY ...

  7. 在IE8中如何通过javascripts改变<style />中的内容?

    1.createStyleSheet() if(document.createStyleSheet){  var cssStyle=document.createStyleSheet();  //兼容 ...

  8. HttpReceiveRequestEntityBody 使用应注意的地方

    如果EntityBody数据很大,调用此函数是不能完全接收全部数据的,我们不能简单的判断 1: BYTE* pBuffer = new BYTE[4096]; 2: ZeroMemory(pBuffe ...

  9. 给当前的URL添加/更新新的参数

    /** * 给当前的URL添加/更新新的参数 * @param a 参数 * @param b 值 * @returns {string} 新的参数 * @constructor */ functio ...

  10. ural 1352. Mersenne Primes

    1352. Mersenne Primes Time limit: 1.0 secondMemory limit: 64 MB Definition. If the number 2N−1 is pr ...