C多行宏:do / while(0)vs scope block 我已經(jīng)看到一些包含在do / while(0)循環(huán)中的多行C宏,如:#define FOO \
做{\
do_stuff_here \
do_more_stuff \
} while(0)與使用基本塊相反,以這種方式編寫代碼有什么好處(如果有的話):#define FOO \
{\
do_stuff_here \
do_more_stuff \
}
- 1 回答
- 0 關注
- 494 瀏覽
添加回答
舉報
0/150
提交
取消