Fatal Error C1016
Visual Studio 2015
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 C1016.
ifdef expected an identifier#ifndef expected an identifier
The conditional compilation directive (#ifdef or #ifndef) has no identifier to evaluate. To resolve the error, specify an identifier.
The following sample generates C1016:
// C1016.cpp
#ifdef // C1016
#define FC1016
#endif
int main() {}
Possible resolution:
// C1016b.cpp
#ifdef X
#define FC1016
#endif
int main() {}
Show: