Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

#include <stdbool.h>

Name: Anonymous 2011-10-14 14:26

The header stdbool.h in the C Standard Library for the C
programming language contains four macros for a Boolean data
type. This header was introduced in C99, which was adopted as
an ANSI standard in May 2000. 11 years ago.


#ifndef _STDBOOL_H
#define _STDBOOL_H

#define bool _Bool
#define true 1
#define false 0
#define __bool_true_false_are_defined 1

#endif


Spread the word!

Name: Anonymous 2011-10-14 15:02

>>5

Out of curiosity, I always wondered why people didn't use char instead of int for representing booleans in pre-C99 code.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List