在VS2003中编译工程出现错误:
fatal error C1010: 在查找预编译头指令时遇到意外的文件结尾
原因:头文件中没有引用
#include "stdafx.h"
编译器在寻找预编译指示头文件(默认#include "stdafx.h")时,文件未预期结束,没有找到预编译指示信息的头文件"stdafx.h"。
VC的预编译技术:http://blog.csdn.net/hotandhot/article/details/1346195
解决方法:
第一种,添加#include "stdafx.h"
第二种,在出错的文件上右键选属性,配置属性 -> C/C++ ->预编译头,在“创建/使用预编译头”这里设置不使用预编译头。