1,数据类型:我们通常使用的数据为以下几种,至于基于这些数据封装的数据我们这里先不去讨论;
(1),int/unsigned int
(2),char/unsigned char
(3),short/unsigned short
(4),long/unsigned long
(5),float/double
(6),struct(结构体)
(7),union(联合体)
(8),enum(枚举)
(9),*(指针)
从计算机内存派发角度来看,我们先来看看这个例子
typedef enum en
{
red,
blue,
green,
yellow
}ENU_COLOR;
typedef struct
{
int aa;//4
short cc;//4,4字节对齐
char bb;//4,4字节对齐
float dd;//4
double ff;//8
long gg;//8
ENU_COLOR ee; //