How to solve fatal error C1010!


in compiled VC++6.0 is, appears

fatal error C1010: unexpected end of file while looking for precompiled header directive

problem explanation in detail:

fatal error C1010, the file did not end as expected while looking for a precompiled indication header file. The header file where the precompiled indication information was not found.

problems generally occur in:

adds some CPP files to an MFC program by adding files, but the CPP file is not MFC, is standard C++.

solution 1:

, right-click the CPP file in the Project Project and set it to the first item: Not using preheaders, from the C++ Header on the Project Settings page.

solution 2:
Add the include file stdafx.h at the beginning of the.cpp file.

# include “stdafx. H”

from: MSDN

Visual C++ Concepts: Building A C/C++ Program

Fatal Error C1070

mismatched #if/#endif pair in file ‘filename
An #if, #ifdef, or #ifndef directive has no corresponding #endif. The following sample generates C1070:

// C1070.cpp
#define TEST

#ifdef TEST
// use the line below to resolve the error
// #endif

#ifdef TEST


int main() {
// C1070

Read More: