zoukankan      html  css  js  c++  java
  • C Standard Library: Error Functions

    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");

  • 相关阅读:
    进程
    并发编程
    操作系统的发展史
    __init__、__new__、__call__ 方法
    MongoDB文档操作
    MongoDB集合操作
    MongoDB数据库操作
    MongoDB连接
    MongoDB的文档存储结构
    MongoDB 概念
  • 原文地址:https://www.cnblogs.com/freewater/p/2972253.html
Copyright © 2011-2022 走看看