所以我的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