|
typedef struct LEAF_S
{
unsigned short node_type;
unsigned char tag;
unsigned char type;
void *testproc;
}LEAF_T;
typedef struct ARC_S
{
unsigned long id;
struct ARC_S *nodep;
} ARC_T;
typedef struct NODE_S
{
unsigned short node_type;
struct ARC_S *arcs;
} NODE_T;
NODE_T *np;
ARC_T *ap;
LEAF_T lnode ={1,0x04,0x01,(void *)0x00402b70};
np = (NODE_T *)&lnode;
运行后
np变成了下面的形式{1, 0x00402b70},np中的arcs指针任然指向0x00402b70位置,按里应该指向node_type后面的位置,应该不是0x00402b70位置
其中np中没有了tag,type类型,不知道为什么?
|
|