Microsoft KB Archive/39088

{|
 * width="100%"|

PRB: C1004: Unexpected EOF

 * }

Q39088

-

The information in this article applies to:


 * The C/C++ Compiler (CL.EXE), included with:
 * Microsoft C/C++ for MS-DOS, versions 5.1, 6.0, 6.0a, 6.0ax, 7.0
 * Microsoft Visual C++, versions 1.0, 1.5, 1.51'1.52
 * Microsoft C for OS/2

-

SYMPTOMS
The following error is generated:

C1004: Unexpected end of file found

CAUSE
The above error may be caused by failing to end a line with a . On pure C-language statements, the compiler ignores white space; however, on statements with directives, a  is needed.

This error occurs if the following include file is used in a program:

  #include  #define YES 1 #define NO 0 Without the  after the third line, error C1004 is produced by the compiler.

RESOLUTION
Make sure each line ends with a .

NOTE: This problem does not occur with any of the 32-bit compilers.

Additional query words: 1.00 1.50 1.51 1.52 5.10 6.00 6.00a 6.00ax 7.00 8.00

Keywords : kb16bitonly kbCompiler kbprb

Issue type : kbprb

Technology : kbVCsearch kbAudDeveloper kbCVCComp