1:
在查找预编译头使用时跳过解决
环境:VS2008
微软官方解释:
Visual C++Concepts: Building a C/C++ ProgramCompiler Warning (level 1) C4627Error Message
”: skipped when looking for precompiled header use
While searching for the location where a precompiled header is used, thecompiler encountered an #include directive for the include file. The compilerignores the #include directive, but issues warning C4627 if the precompiledheader does not already contain the include file.
解决方案:
1、去掉预编译头
项目->属性->配置属性->c/c++->预编译头->创建使用预编译头->不使用预编译头
2、将包含文件加到预编译头stdafx.h文件中
3、在每个.cpp中包含预编译头stdafx.h文件
2:
#include “包含文件名” 或 #include <包含文件名>
两种格式的区别仅在于:
①使用双引号:系统首先到当前目录下查找被包含文件,如果没找到,再到系统指定的“包含文件目录”(由用户在配置环境时设置)去查找。
②使用尖括号:直接到系统指定的“包含文件目录”去查找。一般地说,使用双引号比较保险。
多文件结构
大程序倾向于分成多个源文件,其理由为&