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

Compiler Error C2891

Error Message

'parameter' : cannot take the address of a template parameter

Instead of using code like this:

template <int i> int* f() { return &i; }

use this:

template <int i> int* f() { return i; }

Community Additions

ADD
Show:
© 2015 Microsoft