PRB: C1004: Unexpected EOF

ID: Q39088


The information in this article applies to:


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 <CR>. On pure C-language statements, the compiler ignores white space; however, on statements with directives, a <CR> is needed.

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


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


RESOLUTION

Make sure each line ends with a <CR>.

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 
Version           : 5.10 6.00 6.00a 6.00ax 7.00 | 5.
Platform          : MS-DOS OS/2 WINDOWS 
Issue type        : 

Last Reviewed: July 22, 1999