gpt4 book ai didi

c - 包括 stdio 和 stddef

转载 作者:太空宇宙 更新时间:2023-11-04 07:20:21 26 4
gpt4 key购买 nike

我目前正在准备C认证,在有关指针NULL的类(class)资料中,有这行让我很困扰:

if you want to use the NULL symbol you have to include one of the following header files: stdio.h or stddef.h. The NULL symbol is defined in there.

(粗体在来源中)

由于强调了 or,所以我将其解读为“永远不要同时包含两者”。这是一个真正的规范,还是只是类(class) Material 中的(许多)缺陷之一?

最佳答案

因为 stdio.h 包含 stddef.h,所以包含两者是没有用的。但如果需要,您可以同时包含两者,因为有一个保护措施可以避免多次包含。

关于c - 包括 stdio 和 stddef,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21986507/

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