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

Compiler Error C2710

'construct' : '__declspec(modifier)' can only be applied to a function returning a pointer

A function whose return value is a pointer is the only construct to which modifier can be applied.

The following sample generates C2710:

// C2710.cpp
__declspec(restrict) void f();   // C2710
// try the following line instead
__declspec(restrict) int * g();

Community Additions

ADD
Show:
© 2015 Microsoft