我的Visual Studio声明tag1和tag2未定义,但它们显然已被定义,我不能基于一个定义另一个吗?
#define push 99
#define last_instruction push
#ifdef DEBUG
#define new_instr (1+last_instruction) //should be 100
#undef last_instruction
#define last_instruction new_instr //redifine to 100 if debug
#endif
我有一些带有tag2标签的情况,它要求定义必须是常量(const),但实际上它是常数(1+99),如果有任何帮助将不胜感激。
谢谢! BA
__COUNTER__
可以帮助你。 - Daniel