Are readymade header files available for download from somewhere?
08-24-2006
10:44 PM
5,859 次查看
Hi
I wanted to use the stdbool.h header file and cannot find it and was wondering if there any any place to download the same that has been compiled for the codewarrior.
Thanks,
Sujith
I wanted to use the stdbool.h header file and cannot find it and was wondering if there any any place to download the same that has been compiled for the codewarrior.
Thanks,
Sujith
4 回复数
08-28-2006
10:07 AM
1,084 次查看
stdbool.h is C99 specific. Codewarrior does not implement C99.
stdtypes.h is not standard at all.
My advice would be to write your own h-file:
#ifndef _BOOL_H
#define _BOOL_H
typedef unsigned char BOOL;
#define FALSE 0
#define TRUE 1
#endif
Or with typedef enum{FALSE, TRUE}BOOL, but that would be less efficient since enum is likely 16-bit.
stdtypes.h is not standard at all.
My advice would be to write your own h-file:
#ifndef _BOOL_H
#define _BOOL_H
typedef unsigned char BOOL;
#define FALSE 0
#define TRUE 1
#endif
Or with typedef enum{FALSE, TRUE}BOOL, but that would be less efficient since enum is likely 16-bit.
