这是迄今为止我所包含的所有.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?
pmg*_*pmg 16
bool是只是一个宏是扩展到_Bool.您可以使用_Bool不带#include很像,您可以使用int或double; 它是一个C99关键字.
该宏<stdbool.h>与其他3个宏一起定义.
定义的宏是
bool:宏扩展到 _Boolfalse:宏扩展到 0true:宏扩展到 1__bool_true_false_are_defined:宏扩展到 1