If I type the word "true" it keeps rejecting it.... ??
You mean you get compiler errors?
There is no keyword "true" (or "false") in a lot of C compilers (although I believe it was added to the standard in C99 many compilers still only support C89).
In C the terms true and false are normally appilied to integer expressions (having type char, short, int, long). In this instance a value of 0 is false and any other value is true
e.g. for a char variable
0 = false
1 - 255 = true
Logical expressions (== <= > etc) return 0 or 1. Many (most even) developments end up defining a boolean type, this is normally either an enum or a typedefed integer with #defined true and false values
-
typedef char boolean;
-
#define FALSE 0
-
#define TRUE 1
-
-
typedef enum tag_bool {
-
false = 0,
-
true = 1
-
} bool;
-
Whether an expression is treated as a boolean expression or not depends entirely on the context it is used in.
in C99 and C++ there is a bool type defined in the languagewith takes values true and false. In this case bool, true amd false are keywords of the language.