Fatal Error C1004
unexpected end of file found
The compiler reached the end of a source file without resolving a construct.
For instance, a function or structure definition may be missing a closing curly brace, a class definition may be missing a semicolon after its closing brace, a function call or expression may have mismatched parentheses, and so on.
In addition to these common causes, one of the following reasons may have caused this error:
- The default disk drive did not contain sufficient space for compiler-generated temporary files. The space required is approximately two times the size of the source file.
- An #if directive evaluates to false without a corresponding closing #endif directive.
- The precompiled headers option (/Yu) is enabled but the file doesn't contain a hdrstop pragma.
- The /Yufilename option is used and the source file being compiled does not contain an #include "filename" directive that uses the same filename used with /Yu.
- A source file does not end with a carriage return–linefeed pair.
Tips
- Make sure that each opening brace has a matching closing brace.
- Make sure that each opening parenthesis has a matching closing parenthesis.
- Make sure all class definitions have a semicolon after the closing brace for the class.
- When using C-style comments (i.e. /* ... */), make sure there is a closing asterisk-slash ( */ ) combination.