最近看了很多程序的宏定义,总感觉对数据类型的位数模糊了
typedef unsigned char
INT8U;
typedef signed
char
INT8;
typedef unsigned short INT16U;
typedef signed
short INT16;
typedef unsigned int
INT32U;
typedef signed
int
INT32;
typedef float
FP32;
typedef double
FP64;
感觉和以前看的不一样,只好google下,终于找到了个答案,可以自己用sizeof()写个程序测试下:
在32位系统中
Long int = int = 32bit short int = 16bit
在16位系统中
short int = int = 16bit long int = 32bit
总之: short int = 16bit long int = 32bit
在16位系统中
总之: