none
What does this error mean

    Question

  •  

    I have about 5 .h files and 5 .cpp files, that someone gave me.  What I would like to do is to create a console application to use these function in these 5 cpp files.  The thing is that I notice is that it seems like there are many console type applications.

     

    When I create my console application is says..

     "unexpected end of file while looking for precompiled header.  Did you forget to add #include stdafx.h" to your source?"

     

    What can I do to avoid this error?

     

    Thanks

     

    Monday, October 01, 2007 10:27 PM

Answers

  •  

    Unexpected end of File means SomeWhere in your Code you forget to Close the Brace (Missing Braces or Semicolon etc) . it's a Syntax Error. Just Check out your code Once again. Second thing put stdafx.h on the top of the all header File.and in Last go to Project Settings under C/C++ tab choose Precompiled header File.and use Fourth use Compiler header File through (mention here stdafx.h)

     

    Thanx

    Tuesday, October 02, 2007 3:07 AM

All replies

  •  

    Unexpected end of File means SomeWhere in your Code you forget to Close the Brace (Missing Braces or Semicolon etc) . it's a Syntax Error. Just Check out your code Once again. Second thing put stdafx.h on the top of the all header File.and in Last go to Project Settings under C/C++ tab choose Precompiled header File.and use Fourth use Compiler header File through (mention here stdafx.h)

     

    Thanx

    Tuesday, October 02, 2007 3:07 AM
  • There are many possible causes, so we need more information.

     

    Among the files provided to you, are there a stdafx.h and stdafx.cpp? If there is, or even if there is just a stdafx.h (I assume not since there is an equal number of h and cpp files) then is there an #include "stdafx.h" at the top of each of the cpp files?

     

    How did you create the project?

     

    Are you familiar with precompiled headers? Do you know what they are? Do you know where the option is for specifying precompiled headers?

    Tuesday, October 02, 2007 4:48 AM
  • I found out where you turn the pre compile headers off and it works great.

     

    Thanks

    Wednesday, October 03, 2007 5:51 PM