C语言的初学时就遇到了很奇怪的问题,是不是不用想这么多,耽误大家的时间,希望能一起探讨
关于“stdafx.h”的作用和 unexpected end of file while looking for precompiled header directive的问题
1 这段代码的初始错误就如下图中写的“unexpected end of file while looking for precompiled header directive”
2 在上面添加了 #include"stdafx.h" 之后,好像又不识别关键词了,出现了10个错误
3 我在此基础上在菜单Project->Settings->C/C+±>Precompile Header,设置为第一项:Not using precompile headers 之后时又出现了两个错误,缺少";"
4 在我删除了#include"stdafx.h"之后且菜单Project->Settings->C/C+±>Precompile Header,仍为第一项时,还是上面的两个错误。
对于以上的四种情况,是代码内容本身有问题吗,并且“stdafx.h”的作用是什么呢,在菜单Project->Settings->C/C+±>Precompile Header中设置为第一项之后,为什么结果都是同样的错误呢没有变化呢,这是为什么呢?