Union

联合union是一种特殊的类.一个联合中的数据成员在内存中的存储是互相重叠的.每个数据成员都在相同的内存地址开始.分配给联合的存储区数量是要包含它最大的数据成员所需的内存数.同一时刻只有一个成员可以被赋给一个值.

A union is a special kind of class. The data members in a union are stored in memory in such a way that they overlap each other. Each member begins at the same memory address. The amount of storage allocated for a union is the amount necessary to contain its largest data member. Only one member at a time may be assigned a value.

Union is a special kind of class. The data members of a union are overlapped in memory. Each data member has the same memory address. The size of a union is determined by the size of the biggest data member which the union contains. Any time only one member can be assigned with a value.

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试

关闭