sách gpt4 ăn đã đi

c - 预处理器#ifndef

In lại Tác giả: Walker 123 更新时间:2023-11-30 14:26:02 27 4
mua khóa gpt4 giày nike

假设我有a.h其中包括以下内容:




假设我还有b.h其中还包括 。如果a.h#ifndef其中的预处理器定义语句和 b.h没有。会a.h仅包含 b.h 中未包含的内容?那么当 b.h包括a.h ,将 a.h包括stddef.hstein.h并且不重新包含stdbool.h或者那些预处理器定义函数仅用于查看整个类是否被重新定义,而不是其中的特定函数?

biên tập:

此外,假设 b.h包含另一个头文件,其中包含 stdbool.h -这使得b.hstdbool.h都来自该类(class)和 a.h 。这会导致错误吗?

câu trả lời hay nhất

所有 C 标准头文件都必须能够以任意顺序多次包含:

Standard headers may be included in any order; each may be included more than once in a given scope, with no effect different from being included only once

关于c - 预处理器#ifndef,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9690212/

27 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress