联合用法举例;
struct table
{
int pp;
char tt[20];
};
struct list
{
char name;
char password;
};
struct All
{
int ID;
union
{
struct table t;
struct list l;
int li;
}uk;
};
在结构 All中 t,l,li共用一个内存单元,也就是起始地址相同。