Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error C2850
Collapse the table of content
Expand the table of content

Compiler Error C2850

Error Message

'construct' : only allowed at file scope; may not be in a nested construct

Constructs, such as some pragmas, can only appear at global scope.

The following sample generates C2850:

// C2850.cpp
// #pragma hdrstop ok
namespace X {
   #pragma hdrstop   // C2850

Community Additions

© 2015 Microsoft