Export (0) Print
Expand All
Expand Minimize

Compiler Error C2891

'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:
© 2014 Microsoft