Mail Archives: djgpp/1998/12/30/23:11:03
On Thu, 31 Dec 1998, pjotr wrote:
> I recently installed DJGPP along with RHIDE. My problem is, I want to
> use the BOOl type variable in my C programs, but for some reason the
> compiler does not understand it, eventhough RHIDE acknowledges "bool"
> as a valid keyword (e.g. it turns white on screen).
>
> I tried creating my own BOOL variable type by writing my own header
> file "types.h":
>
>
> #ifndef TYPES_H
> #define TYPES_H
>
> enum BOOL
> {
> FALSE = 0,
> TRUE = 1;
> };
>
> #endif /* TYPES_H */
>
>
> But even after this the compiler insists it does not know the BOOL
> type... Any sugestions?
Defining it your way, you must say "enum BOOL var;". Try:
typedef enum BOOL {
FALSE = 0,
TRUE
} BOOL;
- Raw text -