增加 perror 说明.

Signed-off-by: rick.chan <chenyang@autoai.com>
This commit is contained in:
rick.chan 2021-04-12 09:06:48 +08:00
parent 7b37dd2231
commit 398cc5eac4
1 changed files with 28 additions and 0 deletions

View File

@ -8,3 +8,31 @@
*/ */
#include <stddef.h> #include <stddef.h>
``` ```
## 2.stdlib 库
## 2.1.perror
**头文件:**
```cpp
#include <stdlib.h>
```
**函数原型:**
```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.
**参数:**
sFirst (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.
**返回值:**
无。