Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 569 Bytes

fatal-error-c1018.md

File metadata and controls

34 lines (26 loc) · 569 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Fatal Error C1018
Fatal Error C1018
11/04/2016
C1018
C1018
2ceb8a99-30b2-4b80-bf42-e9f3305b3c52

Fatal Error C1018

unexpected #elif

The #elif directive appears outside an #if, #ifdef, or #ifndef construct. Use #elif only within one of these constructs.

The following sample generates C1018:

// C1018.cpp
#elif      // C1018
#endif

int main() {}

Possible resolution:

// C1018b.cpp
#if 1
#elif
#endif

int main() {}