Export (0) Print
Expand All
Expand Minimize

Compiler Error C2854

syntax error in #pragma hdrstop

The #pragma hdrstop gives an invalid filename. The pragma can be followed by an optional filename in parentheses and quotation marks:

The following sample generates C2854:

// C2854.cpp
// compile with: /c
#pragma hdrstop( "\\source\\pchfiles\\myheader.pch" ]   // C2854
// try the following line instead
// #pragma hdrstop( "\\source\\pchfiles\\myheader.pch" )

Community Additions

ADD
Show:
© 2015 Microsoft