所以我的Visual Studio声明tag1和tag2都是未定义的,但它们是cleary定义的,我不能定义基于另一个?C#定义在另一个#define错误
#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
请[阅读此](http://stackoverflow.com/help/mcve)。 –
您应该尝试启用“生成预处理文件”选项(/ P)以查看正在进行的操作。 –
也许'__COUNTER__'会帮助你。 – Dani