Fatal Error C1071

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Fatal Error C1071.

unexpected end of file found in comment

The compiler reached the end of the file while scanning a comment.

To fix by checking the following possible causes

  1. Missing comment terminator (*/).

  2. Missing newline character after a comment on the last line of a source file.

The following sample generates C1071:

// C1071.cpp  
int main() {  
}  
  
/* this comment is fine */  
/* forgot the closing tag        // C1071  

Show: