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.

阅读更多
文章标签: each 存储
个人分类: Computer English
想对作者说点什么? 我来说一句

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

关闭
关闭
关闭