|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#2
|
||||||
|
||||||
|
Re: boolean
There is no boolean variable type in C. Most people declare it as char (or unsigned char) and use the value 0 for false and 1 (or any value != 0) for true.
Through the use of #defines and typedefs, you can emulate it, though. Code:
typedef unsigned char bool #define TRUE 1 #define FALSE 0 |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Boolean statement | blindguyinanorg | Programming | 2 | 15-02-2004 07:31 |