當前位置:
首頁 >
linux出错处理
發布時間:2025/4/5
42
豆豆
主要的函數是 char * strerror(int errnum) ?和 void perror(const char *msg)?
#include <stdio.h>#include <errno.h>
int main(int argc, char *argv[]){
fprintf(stderr, "eacces: %s\n", strerror(EDQUOT));
//在標準出錯上產生一條出錯信息
errno = ENOENT;
perror(argv[0]);
return 0;
}
總結
- 上一篇: UBUNTU无法播放mp4格式电影的烦恼
- 下一篇: Linux中查看信息的命令