By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,194 Members | 859 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,194 IT Pros & Developers. It's quick & easy.


P: 17
im writin a code for a linked list getting the error " cant open include file : stdafx.h. no such file or directory"
what do i do???
Feb 26 '07 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 5K+
P: 8,916
stdafx.h is a file that is create by Visual C++ for you when you create a project.

Either you have moved you code file out of it's original project directory without moving stdafx.h, or you have deleted the stdafx.h that VC++ created without removing the #include.

Since stdafx.h is a part of you project source code if you are not using it then just remove the #include.
Feb 26 '07 #2

P: 17
but when i remove the include "stdafx.h" i get 23 errors!!
Feb 26 '07 #3

Expert Mod 5K+
P: 8,916
That is because failing to find an include file is such a critical error that generally the compiler stops imediately and doesn't compile any more of the file thus masking any errors in it.

Anyway stdafx.h will only have had what you put into it (in might have included "windows.h").

Just fix those 23 errors.
Feb 26 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.