版本1和3间的区别 (跳过第2版)
于2006-06-20 20:33:10修订的的版本1
大小: 961
编辑: czk
备注:
于2007-08-07 19:52:12修订的的版本3
大小: 1001
编辑: czk
备注:
删除的内容标记成这样。 加入的内容标记成这样。
行号 1: 行号 1:
## page was renamed from Standard Library/B.01.7 Error Functions
行号 24: 行号 25:
[[Navigation(siblings)]]

Navigation(slides)

B.1.7 Error Functions

Many of the functions in the library set status indicators when error or end of file occur. These indicators may be set and tested explicitly. In addition, the integer expression errno (declared in <errno.h>) may contain an error number that gives further information about the most recent error.

void clearerr(FILE *stream)
  • clearerr clears the end of file and error indicators for stream.

int feof(FILE *stream)
  • feof returns non-zero if the end of file indicator for stream is set.

int ferror(FILE *stream)
  • ferror returns non-zero if the error indicator for stream is set.

void perror(const char *s)
  • perror(s) prints s and an implementation-defined error message corresponding to the integer in errno, as if by

        fprintf(stderr, "%s: %s\n", s, "error message");
  • See strerror in Section B.3.

TCPL/B.01.7_Error_Functions (2008-02-23 15:34:09由localhost编辑)

ch3n2k.com | Copyright (c) 2004-2020 czk.