Edit

Share via


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>