编译时出现
fatal error C1010: 
unexpected end of file while looking for precompiled header directivemsdn上是这么说的:
Fatal Error C1010
unexpected end of file while looking for precompiled header directiveA precompiled header was specified, but it did not contain a precompiled header directive.This error can be caused by specifying an incorrect file as a header file, or by specifying an include file with the /Yu (Use Precompiled Header) command line option that is not listed in the source file as an include file.我的头文件没有问题,不过我不知道by specifying an include file with the /Yu (Use Precompiled Header) command line option that is not listed in the source file as an include file.是什么意思,高手帮帮忙,谢谢了

解决方案 »

  1.   

    Visual C++ 概念:生成 C/C++ 程序   致命错误 C1010
    在查找预编译头指令时遇到意外的文件结尾用 /Yu 指定的包含文件没有列在源文件中。您是否不小心删除了 #include 语句,而该语句引用了 /Yu 所需的 .h 文件?
      

  2.   

    在该cpp文件头上加上:
    #include "stdafx.h"
      

  3.   

    #include "stdafx.h"加上这句以后还是有错误,说我再另一个.h文件里声明的类以及成员都是未声明的,
    我明明包含了这个.h啊,为什么还是"未声明"的呢?
      

  4.   

    可以了   只是把包含的.h写在#include "stdafx.h"的后面就好了,什么原因啊?