C++提供了许多种基本的数据类型(如int、float、double、char等)供用户使用。但是由于程序需要处理的问题往往比较复杂,而且呈多样化,已有的数据类型显得不能满足使用要求。因此C++允许用户根据需要自己声明一些类型,用户可以自己声明的类型还有结构体类型(structure)、共用体类型(union)、枚举类型(enumeration)、类类型(class )等,这些统称为用户自定义类型(user-defined type,UDT)。
在读取模块设计中、本文定义了双向链表结点复合结构体类型。
In the read module design, this article have defined the bidirectional chain table point compound syntagma type.
应用结构体类型或变量的时候, 返回事实的大小,包括为对齐而填充字节。
When applied to a structure type or variable, sizeof returns the actual size, whichmay include padding bytes inserted for alignment.
一个结构体类型的成员被放置在上父结构体一个成员之后的地址这个地址是结构体本身对齐长度的整数倍。
The size of a structure is the smallest multiple of its alignment larger greater than or equal the offset of the end of its last member.
应用推荐