Fatal Error C1021

 

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 C1021.

invalid preprocessor command 'string'

string is not a valid preprocessor directive. To resolve the error, use a valid preprocessor name for string.

The following sample generates C1021:

// C1021.cpp  
#BadPreProcName    // C1021 delete line  

Show: