Multi-line DEFINE directives?

后端 未结 3 804
隐瞒了意图╮
隐瞒了意图╮ 2020-12-13 08:40

I am not an expert, so go easy on me. Are there any differences between these two code segments?

#define BIT3 (0x1
<
<
3)
static int a;
3条回答
  •  失恋的感觉
    2020-12-13 09:11

    The first one should not work. Lines should be separated with backslash THEN newline. Like so:

    #define SOME_MACRO "whatever" \
    "more" \
    "yet more"
    

提交回复
热议问题