Namespaces
Variants
Actions

Standard library header <stdbool.h> (C99)(deprecated in C23)

From cppreference.com
< c‎ | header
 
C
 
Standard Library headers

This header provides macros for boolean type.

Macros

bool
(C99)(removed in C23)
convenience macro, expands to _Bool
(keyword macro)

Macro constants

true
(C99)(removed in C23)
expands to integer constant 1
(macro constant)
false
(C99)(removed in C23)
expands to integer constant 0
(macro constant)
__bool_true_false_are_defined
(C99)(deprecated in C23)
expands to integer constant 1
(macro constant)

[edit] Synopsis

#if __STDC_VERSION__ < 202311l
#define bool _Bool
#define true 1
#define false 0
#endif
 
#define __bool_true_false_are_defined 1

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant