首页 > 其他 > 详细

错误代码

时间:2019-12-11 23:43:46      阅读:124      评论:0      收藏:0      [点我收藏+]

用以下程序查看错误代码的含义:

#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>

int main()
{
    int i=0;
    for(i=0;i<43;i++)//43及以后就木有了
        printf("errno:%d:\t%s\n",i,strerror(i));
    return 0;
}

运行的结果是:

errno:0: No error
errno:1: Operation not permitted
errno:2: No such file or directory
errno:3: No such process
errno:4: Interrupted function call
errno:5: Input/output error
errno:6: No such device or address
errno:7: Arg list too long
errno:8: Exec format error
errno:9: Bad file descriptor
errno:10: No child processes
errno:11: Resource temporarily unavailable
errno:12: Not enough space
errno:13: Permission denied
errno:14: Bad address
errno:15: Unknown error
errno:16: Resource device
errno:17: File exists
errno:18: Improper link
errno:19: No such device
errno:20: Not a directory
errno:21: Is a directory
errno:22: Invalid argument
errno:23: Too many open files in system
errno:24: Too many open files
errno:25: Inappropriate I/O control operation
errno:26: Unknown error
errno:27: File too large
errno:28: No space left on device
errno:29: Invalid seek
errno:30: Read-only file system
errno:31: Too many links
errno:32: Broken pipe
errno:33: Domain error
errno:34: Result too large
errno:35: Unknown error
errno:36: Resource deadlock avoided
errno:37: Unknown error
errno:38: Filename too long
errno:39: No locks available
errno:40: Function not implemented
errno:41: Directory not empty
errno:42: Illegal byte sequence

错误代码

原文:https://www.cnblogs.com/castor-xu/p/12026515.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!