stdafx.h

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • greek
    New Member
    • Nov 2006
    • 17

    stdafx.h

    im writin a code for a linked list question..im getting the error " cant open include file : stdafx.h. no such file or directory"
    what do i do???
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    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.

    Comment

    • greek
      New Member
      • Nov 2006
      • 17

      #3
      but when i remove the include "stdafx.h" i get 23 errors!!

      Comment

      • Banfa
        Recognized Expert Expert
        • Feb 2006
        • 9067

        #4
        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.

        Comment

        Working...