機能 |
処理系定義のエラーメッセージ文字列を取得する。 |
||
---|---|---|---|
定義 |
#include <string.h> char * strerror ( int errnum ); |
||
引数 |
|
||
戻り値 |
エラーメッセージ文字列へのポインタを返す。 |
||
実装例 |
#include <string.h> #include <stdio.h> #include <errno.h> int main(void) { char *str; str = strerror(0); printf("%s\n", str); str = strerror(EDOM); printf("%s\n", str); return 0; } |
||
実行結果 |
No error Domain error |
strerror()