开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜