Fatal Error C1010 Visual Studio 6
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company fatal error c1010 in vc++ Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs c1010 unexpected end of file while looking Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, fatal error c1010 unexpected end of file while looking for precompiled header directive just like you, helping each other. Join them; it only takes a minute: Sign up fatal error C1010 - “stdafx.h” in Visual Studio how can this be corrected? up vote 12 down vote favorite 4 I compile
Fatal Error C1010 C++
the following code but I get a compile error in Visual Studio that I cannot understand. #include
360 games PC games did you forget to add '#include "stdafx.h"' to your source? Windows games Windows phone games Entertainment All Entertainment
Turn Off Precompiled Headers Visual Studio 2015
Movies & TV Music Business & Education Business Students & educators
Unexpected End Of File While Looking For Precompiled Header Directive Vc6
Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet http://stackoverflow.com/questions/20113280/fatal-error-c1010-stdafx-h-in-visual-studio-how-can-this-be-corrected Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All https://support.microsoft.com/en-us/kb/815644 Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
Express http://www.cplusplus.com/forum/beginner/4290/ Edition and Turbo C++.On compilation both of them showed 0 errors and 0 warnings.But while running the program VC++ showed: http://blog.csdn.net/ziren235/article/details/1428869 "fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' fatal error to your source?" and failed to run.But Turbo C++ ran the program smoothly and showed the output. Could any one tell me what's the reason behind and how to fix the problem? My code in VC++: 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include"stdafx.h" #include
【转载】fatal error C1010: unexpected end of file while looking for precompiled header directive 标签: headerfilec编译器vc++mfc 2006-12-04 10:01 121930人阅读 评论(47) 收藏 举报 本文章已收录于: 分类: Visual Studio编程技巧(11) 作者同类文章X 在编译VC++6.0是,出现fatal error C1010: unexpected end of file while looking for precompiled header directive 的错误. 解决方法: 1、如果发生错误的文件是由其他的C代码文件添加进入当前工程而引起的,则Alt+F7进入当前工程的 Settings,选择C/C++选项卡,从Category组合框中选中Precompiled Headers,选择Not Using Precompiled headers。确定。 2、在文件开头添加: #include "stdafx.h" 对预编译头文件说明如下: 所谓头文件预编译,就是把一个工程(Project)中使用的一些MFC标准头文件(如Windows.H、Afxwin.H)预先编译,以后该工程编译时,不再编译这部分头文件,仅仅使用预编译的结果。这样可以加快编译速度,节省时间。 预编译头文件通过编译stdafx.cpp生成,以工程名命名,由于预编译的头文件的后缀是“pch”,所以编译结果文件是projectname.pch。 编译器通过一个头文件stdafx.h来使用预编译头文件。stdafx.h这个头文件名是可以在project的编译设置里指定的。编译器认为,所有在指令#include "stdafx.h"前的代码都是预编译的,它跳过#include "stdafx. h"指令,使用projectname.pch编译这条指令之后的所有代码。 因此,所有的CPP实现文件第一条语句都是:#include "stdafx.h"。 顶 0 踩 0 上一篇【转载】编译器处理相关 下一篇随心所欲改变窗口标题 我的同类文章 Visual Studio编程技巧(11) http://blog.csdn.net 参考知识库 更多资料请参考: 猜你在找 查看评论 * 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场 个人资料 ziren235 访问:263022次 积分:2206 等级: 积分:2206 排名:第12840名 原创:36篇 转载:18篇 译文:8篇 评论:74条 文章搜索 文章分类 Algorithm Study(3) ASP.NET(8) Computer Graphics(5) OnlineJudge(6) OpenSour