gpt4 book ai didi

c - 你包含哪个头文件以在 linux 中的 c 中使用 bool 类型?

转载 作者:太空狗 更新时间:2023-10-29 16:25:01 27 4
gpt4 key购买 nike

这是我到目前为止包含的所有 .h 文件,但没有 bool 的定义:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <sys/types.h>
#include <sys/socket.h>
#include <pthread.h>
#include <netdb.h>
#include <fcntl.h>
#include <unistd.h>
#include <event.h>

哪个文件定义了bool

最佳答案

它是 C99 的一部分并在 POSIX definition stdbool.h 中定义.

关于c - 你包含哪个头文件以在 linux 中的 c 中使用 bool 类型?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6118846/

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