c语言中error 0,谁有c语言中int ferror(FILE *stream),返回非零0代表含义列表?

满意答案

00e27ab806e4881f8254fe7ae8741834.png

sseeeiiv56

2013.06.09

00e27ab806e4881f8254fe7ae8741834.png

采纳率:50%    等级:12

已帮助:21064人

int ferror ( FILE * stream );

Check error indicator

Checks if the error indicator associated with stream is set, returning a value different from zero if it is.

This indicator is generaly set by a previous operation on the stream that failed.

Parameters

stream

Pointer to a FILE object that identifies the stream.

Return Value

If the error indicator associated with the stream was set, the function returns a nonzero value.

Otherwise, it returns a zero value.

根据库函数的说明,非零的error indicator没有具体的含义,就是用来指示这个FILE tream当前有错误发生,一般是为增强代码强健性加入的检验性程序,避免在文件操作时出现程序锁死或错误。 程序中有些错误的具体错误信息往往很难捕捉和辨别的,而且一般是与编译器和操作系统平台相关的。

00分享举报

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值