Compiler Fatal Errors C999 ...


Visual C++ Concepts: Building a C/C++ Program
Fatal Error C1004

unexpected end of file found

The compiler reached the end of a source file without resolving a construct. The code may be missing one of the following elements:

  • A closing brace
  • A closing parenthesis
  • A closing comment marker (*/)
  • A semicolon

Other possible causes

  • The default disk drive has insufficient space for temporary files, which require about twice as much space as the source file.
  • An #if directive that evaluates to false lacks a closing #endif directive.
  • A source file does not end with a carriage return and line feed.

The following sample generates C1004:

// C1004.cpp
#if TEST
// uncomment the next line
// #endif

int main() {
}
// C1004
Page view tracker