Fatal Error C1083 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 error C1083: Cannot open include file: 'stdafx.h': No such file or directory in VS 2005 up vote 11 down vote favorite 3 I am new to visual studio.I have created a simple console application and then selected an empty project of c++. I have pasted the code form http://www.cprogramming.com/tutorial/opengl_first_windows_app.html it is giving the following error error C1083: Cannot open include file: 'stdafx.h': No such file or directory. Can any body help me how ti solve that issue. Also i have pasted the code from http://www.cprogramming.com/tutorial/opengl_windows_programming.html and it gives me error in MessageBox function. c++ windows share|improve this question edited Apr 5 '11 at 3:17 genpfault 35.5k83776 asked Apr 4 '11 at 23:50 Abdul Samad 1,44093556 add a comment| 2 Answers 2 active oldest votes up vote 11 down vote accepted Fall in the pit of success by using an appropriate project template. Which is Win32 + Win32 Project, don't tick the "Empty project" option on the property page. You'll get pre-generated code for a Win32 application, take a look at it since you might want to keep parts of it. Or just delete it all past the #include for stdafx.h and replace it with the code you want to try. The stdafx.h file is already pre-cooked for you. The second snippet probably fails to compile because the code sample is not using Unicode strings. Put an L in front of the string literal, like L"\tHello world". share|improve this answer edited Jan 29 '12 at 13:43 answered Apr 5 '11 at 1:32 Hans Passant 654k819611605 add a comment| up vote 9 down vote "stdafx.h" is the default name for the preco
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: 'stdafx.h' file not found http://stackoverflow.com/questions/5545641/error-c1083-cannot-open-include-file-stdafx-h-no-such-file-or-directory-in up vote 2 down vote favorite I am new to programming C++ and am trying to learn myself through websites (learncpp.com) although I am already stuck on compiling my first program =( . They use Visual Studio to program their code and because I am using a macbook, I just use vi and terminal (or should I use something else?) Here's the helloworld.cpp program I wrote based http://stackoverflow.com/questions/22621928/fatal-error-stdafx-h-file-not-found on the tutorial: #include "stdafx.h" #include SQL Server 2014 Express 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 https://social.msdn.microsoft.com/Forums/en-US/5b5f0d12-ffec-4610-bd1c-fea6678e3fea/fatal-error-c1083-cannot-open-include-file?forum=vcgeneral 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. Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: fatal error C1083: Cannot open include file Visual Studio Languages fatal error , Windows Desktop Development > Visual C++ Question 0 Sign in to vote hi,all, my project was built and running fine, until now I encountered multiple C1083 errors, which I have no idea why Visual Studio 2010 gave me such errors and dont know how to solve the issues: 1> FilteredFolderDlg.cpp 1>FolderDlg_Src\src\FilteredFolderDlg.cpp(7): fatal error C1083: Cannot open fatal error c1083 include file: 'stdafx.h': No such file or directory 1> FolderDlg.cpp 1>FolderDlg_Src\src\FolderDlg.cpp(23): fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory 1> GATrainingDlg.cpp 1>C:\galib247\ga/GAStatistics.h(164): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(105) : see declaration of 'strcpy' 1>C:\galib247\ga/GARealGenome.C(170): warning C4244: '+=' : conversion from 'double' to 'float', possible loss of data 1>C:\galib247\ga/GARealGenome.C(187): warning C4244: '+=' : conversion from 'double' to 'float', possible loss of data 1>C:\galib247\ga/GARealGenome.C(277): warning C4244: 'argument' : conversion from 'double' to 'const float', possible loss of data 1>C:\galib247\ga/GARealGenome.C(278): warning C4244: 'argument' : conversion from 'double' to 'const float', possible loss of data 1>C:\galib247\ga/GARealGenome.C(289): warning C4244: 'argument' : conversion from 'double' to 'const float', possible loss of data 1>C:\galib247\ga/GARealGenome.C(322): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data 1>C:\galib247\ga/GARealGenome.C(323): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data 1>C:\galib247\ga/GARealGenome.C(341): warning C4244: 'initializing' :