2. perror - 不需要將錯誤信息輸出到日志。一、strerror #include <errno.h>#include <string.h>char * strerror (int errnum); /* See NOTES */errnum:傳入?yún)?shù),錯誤編號的值,一般取 errno 的值;返回值:錯誤原因;作用:調(diào)用任何系統(tǒng)函數(shù),當(dāng)出錯后,系統(tǒng)都會將錯誤代號賦值給全
www.dbjr.com.cn/article/2717...htm 2025-5-23