Compiler Error C3295
Visual Studio 2015
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 C3295.
pragma pragma' can only be used at global or namespace scope
Some pragmas cannot be used in a function. See Pragma Directives and the __Pragma Keyword for more information.
The following sample generates C3295.
// C3295.cpp
int main() {
#pragma managed // C3295
}
Show: