版本1和2间的区别
于2006-06-20 20:33:10修订的的版本1
大小: 961
编辑: czk
备注:
于2007-07-18 21:07:14修订的的版本2
大小: 1027
编辑: czk
备注:
删除的内容标记成这样。 加入的内容标记成这样。
行号 1: 行号 1:
## page was renamed from Standard Library/B.01.7 Error Functions

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.

Navigation(siblings)

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

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