Compiler Error C2006

 

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 Compiler Error C2006.

directive' expected a filename, found 'token'

Directives such as #include or #import require a filename. To resolve the error, make sure token is a valid filename. Also, put the filename in double quotes or angle brackets.

The following sample generates C2006:

// C2006.cpp  
#include stdio.h   // C2006  

Possible resolution:

// C2006b.cpp  
// compile with: /c  
#include <stdio.h>  

Show: