NULL
|
定义于头文件
<stddef.h> |
||
|
定义于头文件
<string.h> |
||
|
定义于头文件
<wchar.h> |
||
|
定义于头文件
<time.h> |
||
|
定义于头文件
<locale.h> |
||
|
定义于头文件
<stdio.h> |
||
|
定义于头文件
<stdlib.h> |
||
|
#define NULL /*implementation-defined*/
|
||
宏 NULL 是实现定义的空指针常量,可为
空指针常量能转换为任何类型;转换结果是该类型的空指针值。
可能的实现
// 兼容 C++ : #define NULL 0 // 不兼容 C++ : #define NULL (10*2 - 20) #define NULL ((void*)0) |