Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 619 Bytes

fatal-error-c1022.md

File metadata and controls

36 lines (28 loc) · 619 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Fatal Error C1022
Fatal Error C1022
11/04/2016
C1022
C1022
edada720-dc73-49bc-bd93-a7945a316312

Fatal Error C1022

expected #endif

An #if, #ifdef, or #ifndef directive has no matching #endif directive. Be sure each #if, #ifdef, or #ifndef has a matching #endif.

The following sample generates C1022:

// C1022.cpp
#define true 1

#if (true)
#else
#else    // C1022

Possible resolution:

// C1022b.cpp
// compile with: /c
#define true 1

#if (true)
#else
#endif