Compiler Error C2019

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see Compiler Error C2019 on docs.microsoft.com. expected preprocessor directive, found 'character'

The character followed a # sign but it is not the first letter of a preprocessor directive.

The following sample generates C2019:

// C2019.cpp  
#!define TRUE 1   // C2019  

Possible resolution:

// C2019b.cpp  
// compile with: /c  
#define TRUE 1  

Show: