Are readymade header files available for download from somewhere?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Are readymade header files available for download from somewhere?

5,404 次查看
pIx
Contributor I
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
标签 (1)
0 项奖励
4 回复数

629 次查看
Lundin
Senior Contributor IV
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.
0 项奖励

629 次查看
imajeff
Contributor III
I looked in my CodeWarrior (8-bit), searching header files for "bool". I found it defined in STDTYPES.H
0 项奖励

629 次查看
pIx
Contributor I
Thanks, I have STDTYPES.H :smileyhappy:.
0 项奖励

629 次查看
imajeff
Contributor III
They should come with your C compiler (what compiler do you use?)

But here is one I use with GCC
0 项奖励