联合用法举例;
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共用一个内存单元,也就是起始地址相同。
联合的使用
最新推荐文章于 2022-06-29 22:38:51 发布