Fatal Error C1010 #include Stdafx.h
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 Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, 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 the following code but I get a compile error in Visual Studio that I cannot understand. #include
resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs and reference Dev centers Retired content Samples We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second. C/C++ Building Reference C/C++ Build Errors Compiler Fatal Errors C999 through C1999 Compiler Fatal Errors C999 through C1999 Fatal Error C1010 Fatal Error C1010 Fatal Error C1010 Fatal Error C999 Fatal Error C1001 Fatal Error C1002 Fatal Error C1003 Fatal Error C1004 Fatal Error C1005 http://stackoverflow.com/questions/20113280/fatal-error-c1010-stdafx-h-in-visual-studio-how-can-this-be-corrected Fatal Error C1007 Fatal Error C1008 Fatal Error C1009 Fatal Error C1010 Fatal Error C1012 Fatal Error C1013 Fatal Error C1014 Fatal Error C1016 Fatal Error C1017 Fatal Error C1018 Fatal Error C1019 Fatal Error C1020 Fatal Error C1021 Fatal Error C1022 Fatal Error C1023 Fatal Error C1026 Fatal Error C1033 Fatal Error C1034 Fatal Error C1035 Fatal Error C1037 Fatal Error C1038 Fatal https://msdn.microsoft.com/en-us/library/d7fz9ckx(v=vs.90).aspx Error C1045 Fatal Error C1046 Fatal Error C1047 Fatal Error C1051 Fatal Error C1053 Fatal Error C1054 Fatal Error C1055 Fatal Error C1057 Fatal Error C1059 Fatal Error C1060 Fatal Error C1061 Fatal Error C1064 Fatal Error C1065 Fatal Error C1067 Fatal Error C1068 Fatal Error C1070 Fatal Error C1071 Fatal Error C1073 Fatal Error C1074 Fatal Error C1075 Fatal Error C1076 Fatal Error C1077 Fatal Error C1079 Fatal Error C1080 Fatal Error C1081 Fatal Error C1082 Fatal Error C1083 Fatal Error C1084 Fatal Error C1085 Fatal Error C1086 Fatal Error C1087 Fatal Error C1088 Fatal Error C1089 Fatal Error C1091 Fatal Error C1092 Fatal Error C1093 Fatal Error C1094 Fatal Error C1098 Fatal Error C1099 Fatal Error C1100 Fatal Error C1103 Fatal Error C1104 Fatal Error C1107 Fatal Error C1108 Fatal Error C1109 Fatal Error C1113 Fatal Error C1120 Fatal Error C1121 Fatal Error C1126 Fatal Error C1128 Fatal Error C1189 Fatal Error C1190 Fatal Error C1191 Fatal Error C1192 Fatal Error C1196 Fatal Error C1197 Fatal Error C1201 Fatal Error C1202 Fatal Error C1205 Fatal Error C1206 Fatal Error C1207 Fatal Error C1208 Fatal Error C1209 Fatal Error C
360 games PC games https://support.microsoft.com/en-us/kb/815644 Windows games Windows phone games Entertainment All Entertainment http://www.cplusplus.com/forum/beginner/4290/ Movies & TV Music Business & Education Business Students & educators Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet fatal error 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 fatal error c1010 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 Edition and Turbo C++.On compilation both of them showed 0 errors and 0 warnings.But while running the program VC++ showed: "fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' 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