Storing #define macro value in temporary and re-use it
Is there any way to store a macro value into a tem开发者_运维问答porary and reuse it. pseudo Example:
#define X 0
#ifdef X
#define T X
#undef X
#define X (T + 1) // now X should be 1
#endif
I don't see a way to achieve what you ask for. Depending on what you want to do with that, the use of __COUNTER__
, a common extension, could help you.
精彩评论