Beginner VC++ question 
Author Message
 Beginner VC++ question

I'm sure this is a real basic question but it just isn't making sense to me. When
I try to compile my project, I get "fatal error C1010: unexpected end of file
while looking for precompiled header directive". I'm sure it isn't directly
associated to the source file this is coming from because I'm even getting it on
some source files that I believe have been used before. Any ideas what's up with
this? Do I have to include something in the stdafx.h file? As of now, I haven't
touched the stdafx.h file. It is still the same as was created when I created the
Win32 app. Below is the code from one of the files I'm getting this on.

TIA,
Ryan

#include "MLFuncCtnZone.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

// Constructor
CMLFuncCtnZone::CMLFuncCtnZone ()
{
...

Quote:
}

// More implementation...

// Final function in the source file to the end of file
bool CMLFuncCtnZone::GetRowsOK (int nNumber)
{
...

Quote:
}



Wed, 08 Oct 2003 00:19:11 GMT  
 Beginner VC++ question
Add
#include "stdafx.h"
as the first line of the source listing below.
--
Randy Charles Morin
http://www.kbcafe.com/randycharlesmorin


I'm sure this is a real basic question but it just isn't making sense to me.
When
I try to compile my project, I get "fatal error C1010: unexpected end of
file
while looking for precompiled header directive". I'm sure it isn't directly
associated to the source file this is coming from because I'm even getting
it on
some source files that I believe have been used before. Any ideas what's up
with
this? Do I have to include something in the stdafx.h file? As of now, I
haven't
touched the stdafx.h file. It is still the same as was created when I
created the
Win32 app. Below is the code from one of the files I'm getting this on.

TIA,
Ryan

#include "MLFuncCtnZone.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

// Constructor
CMLFuncCtnZone::CMLFuncCtnZone ()
{
...

Quote:
}

// More implementation...

// Final function in the source file to the end of file
bool CMLFuncCtnZone::GetRowsOK (int nNumber)
{
...

Quote:
}



Wed, 08 Oct 2003 00:41:07 GMT  
 Beginner VC++ question
By way of elaboration,  when you use precompiled header files, it skips over
all lines to the
include "stdafx.h" and used the precompiled header for all that code.

 Since you apparently removed the include stdafx.h line, it scanned the
whole file looking for
it, and found the end of file before it found the line.

You could also turn "use precompiled headers" off.



Quote:
> Add
> #include "stdafx.h"
> as the first line of the source listing below.
> --
> Randy Charles Morin
> http://www.kbcafe.com/randycharlesmorin



> I'm sure this is a real basic question but it just isn't making sense to
me.
> When
> I try to compile my project, I get "fatal error C1010: unexpected end of
> file
> while looking for precompiled header directive". I'm sure it isn't
directly
> associated to the source file this is coming from because I'm even getting
> it on
> some source files that I believe have been used before. Any ideas what's
up
> with
> this? Do I have to include something in the stdafx.h file? As of now, I
> haven't
> touched the stdafx.h file. It is still the same as was created when I
> created the
> Win32 app. Below is the code from one of the files I'm getting this on.

> TIA,
> Ryan

> #include "MLFuncCtnZone.h"

> #ifdef _DEBUG
> #undef THIS_FILE
> static char THIS_FILE[]=__FILE__;
> #define new DEBUG_NEW
> #endif

> // Constructor
> CMLFuncCtnZone::CMLFuncCtnZone ()
> {
> ...
> }

> // More implementation...

> // Final function in the source file to the end of file
> bool CMLFuncCtnZone::GetRowsOK (int nNumber)
> {
> ...
> }



Sun, 12 Oct 2003 22:28:02 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. A Beginner vc++ question

2. help a beginner's question with vc!

3. ADO VC++ Beginner Question

4. VC Beginner's Exception Question...

5. Some VC++5 beginner questions

6. Dumb beginner question on VC++ dev environment

7. VC++ 1.52 Beginner Question

8. Beginner's General VC++ Question

9. Beginner Question about classess and constructors in VC++

10. VC++ beginner's questions...

11. beginner vc++ q (please redirect me if this is the wrong place)

12. beginner: problems going from vc++ 5 to 6.0

 

 
Powered by phpBB® Forum Software