<分区>
我的结构是,
typedef struct {
uint16 a;
uint16 b;
uint8 c[8];
uint8 d;
uint8 e;
}subset_t;
typedef struct node{
subset_t list;
struct node *link;
}all_list
添加列表后,我正在显示。例如添加元素是:
a = 112, b = 341, c = AB321EF6, d = 1, e = 2.
如果我显示,除了 c
之外的一切都很好:它显示 AB321EF61N
。
但是如果我将结构更改为:
typedef struct {
uint16 a;
uint16 b;
uint8 d;
uint8 e;
uint8 c[8];
}subset_t;
然后我得到了准确的结果。据我所知,应该首先给出更高的数据类型。有人说为什么数组应该放在最后。