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

Compiler Error C2161

Error Message

'##' cannot occur at the end of a macro definition

A macro definition ended with a token-pasting operator (##).

The following sample generates C2161:

// C2161.cpp
// compile with: /c
#define mac(a,b) a   // OK
#define mac(a,b) a##   // C2161

Community Additions

© 2015 Microsoft