关于stdafx.h的解释,其实蛮多的,在vs中,既然创建c++工程的时候,默认会给生成main.cpp,并且自动包含了stdafx.h,而且stdafx.h不是c++标准的一部分,那么个人认为,理解stdafx.h最好的方式就是打开stdafx.h,看看里面到底有些什么应该更好。其中的内容如下:

// stdafx.h : 标准系统包含文件的包含文件,
// 或是经常使用但不常更改的
// 特定于项目的包含文件
//

#pragma once

#include "targetver.h"

#include <stdio.h>
#include <tchar.h>



// TODO: 在此处引用程序需要的其他头文件

这说明,已经很直观了,基本不用再额外解释。关于#pragma once,可参考http://blog.csdn.net/passerbysrs/article/details/48024289。

相关文章:

  • 2022-03-08
  • 2021-06-23
  • 2021-10-21
  • 2022-12-23
  • 2021-08-30
  • 2021-06-13
  • 2021-05-16
猜你喜欢
  • 2021-11-25
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案