NULL
提供: cppreference.com
ヘッダ <stddef.h> で定義 | ||
ヘッダ <string.h> で定義 | ||
ヘッダ <wchar.h> で定義 | ||
ヘッダ <time.h> で定義 | ||
ヘッダ <locale.h> で定義 | ||
ヘッダ <stdio.h> で定義 | ||
ヘッダ <stdlib.h> で定義 | ||
#define NULL /*implementation-defined*/ | ||
マクロ NULL
は処理系定義のヌルポインタ定数で、以下のいずれかです。
ヌルポインタ定数は任意のポインタ型に変換できます。 そのような変換の結果はその型のヌルポインタ値になります。
[編集]実装例
// C++ compatible:#define NULL 0// C++ incompatible:#define NULL (10*2 - 20)#define NULL ((void*)0) |
[編集]例
Run this code
[編集]関連項目
NULL の C++リファレンス |