C 标准库 - <stddef.h>
C 语言教程
· 2019-02-20 06:12:30
简介
stddef .h 头文件定义了各种变量类型和宏。这些定义中的大部分也出现在其它头文件中。
库变量
下面是头文件 stddef.h 中定义的变量类型:
| 序号 | 变量 & 描述 |
|---|---|
| 1 | ptrdiff_t 这是有符号整数类型,它是两个指针相减的结果。 |
| 2 | size_t 这是无符号整数类型,它是 sizeof 关键字的结果。 |
| 3 | wchar_t 这是一个宽字符常量大小的整数类型。 |
库宏
下面是头文件 stddef.h 中定义的宏:
| 序号 | 宏 & 描述 |
|---|---|
| 1 | NULL 这个宏是一个空指针常量的值。 |
| 2 | offsetof(type, member-designator) 这会生成一个类型为 size_t 的整型常量,它是一个结构成员相对于结构开头的字节偏移量。成员是由 member-designator 给定的,结构的名称是在 type 中给定的。 |
点击查看所有 C 语言教程 文章: https://codercto.com/courses/l/17.html
Reality Is Broken
Jane McGonigal / Penguin Press HC, The / 2011-1-20 / USD 26.95
Visionary game designer Jane McGonigal reveals how we can harness the power of games to solve real-world problems and boost global happiness. More than 174 million Americans are gamers, and......一起来看看 《Reality Is Broken》 这本书的介绍吧!