How do you use #define?

前端 未结 8 865
鱼传尺愫
鱼传尺愫 2020-12-11 15:03

I\'m wondering about instances when it makes sent to use #define and #if statements. I\'ve known about it for a while, but never incorporated it into my way of coding. How e

8条回答
  •  Happy的楠姐
    2020-12-11 15:32

    Is #define the only thing that determines if the code is included when compiled? If I have #define DEBUGme as a custom symbol, the only way to exclude it from compile is to remove this #define statement?

    You can undefine symbols as well

    #if defined(DEBUG)
    #undef DEBUG
    #endif
    

提交回复
热议问题