PRB: C1004: Unexpected EOF

ID Number: Q39088

4.00 5.00 5.10 6.00 6.00a 6.00ax 7.00 | 5.10 6.00 6.00a

MS-DOS | OS/2

Summary:

SYMPTOMS

In Microsoft C versions 5.1, 6.0, 6.0a, 6.0ax, and C/C++ version 7.0,

the following error may be generated:

C1004: Unexpected EOF

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

Additional reference words: 5.10 6.00 6.00a 6.00ax 7.00