小编Bus*_*ser的帖子

C#基于另一个#define错误的定义

因此,我的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
Run Code Online (Sandbox Code Playgroud)

我在tag2上有一些案例,它说定义必须是const,但它是常量,它是1 + 99,将不胜感激。

谢谢!BA

c c-preprocessor

2
推荐指数
1
解决办法
939
查看次数

标签 统计

c ×1

c-preprocessor ×1