#include<stdio.h>
#include<errno.h>
//函数名:show_err
//功能:在_DEBUG模式下显示IO系统错误信息
//参数: 类型char* ,str 要显示的错误消息
//返回值:类型int 错误码
int show_err(char *str)
{
int err_num = errno;
#if (_DEBUG)
{
perror(str);
}
#endif
_set_errno(0);
return err_num;
}
#include<stdio.h>
#include<errno.h>
//函数名:show_err
//功能:在_DEBUG模式下显示IO系统错误信息
//参数: 类型char* ,str 要显示的错误消息
//返回值:类型int 错误码
int show_err(char *str)
{
int err_num = errno;
#if (_DEBUG)
{
perror(str);
}
#endif
_set_errno(0);
return err_num;
}