gpt4 book ai didi

c - 使用和不使用 do ... while 的宏之间的区别

转载 作者:太空宇宙 更新时间:2023-11-04 00:31:28 24 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Do-While and if-else statements in C/C++ macros

我有以下宏:

#define FREE1(x) do { free(x); x = NULL; } while (0)
#define FREE2(x) free(x); x = NULL

这些宏有什么区别?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com