From 398cc5eac4d7c099903399e3829939cc6e1ad142 Mon Sep 17 00:00:00 2001 From: "rick.chan" Date: Mon, 12 Apr 2021 09:06:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20perror=20=E8=AF=B4?= =?UTF-8?q?=E6=98=8E.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: rick.chan --- .../C/C_Standard_Library/C_标准库实用说明.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Software/Development/Language/C/C_Standard_Library/C_标准库实用说明.md b/Software/Development/Language/C/C_Standard_Library/C_标准库实用说明.md index 1c2647a..99b87a2 100644 --- a/Software/Development/Language/C/C_Standard_Library/C_标准库实用说明.md +++ b/Software/Development/Language/C/C_Standard_Library/C_标准库实用说明.md @@ -8,3 +8,31 @@ */ #include ``` + +## 2.stdlib 库 + +## 2.1.perror + +**头文件:** + +```cpp +#include +``` + +**函数原型:** + +```cpp +void perror(const char *s); +``` + +**说明:** + +The perror() function produces a message on standard error describing the last error encountered during a call to a system or library function. + +**参数:** + +s:First (if s is not NULL and *s is not a null byte ('\0')), the argument string s is printed, followed by a colon and a blank. Then an error message corresponding to the current value of errno and a new-line. To be of most use, the argument string should include the name of the function that incurred the error. + +**返回值:** + +无。