| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2050 人关注过本帖
标题:scanf("%d%d",&a,&b)!=EOF 不懂,能解释给我听吗,谢谢
只看楼主 加入收藏
casual0402
Rank: 1
等 级:新手上路
帖 子:23
专家分:0
注 册:2008-5-11
收藏
 问题点数:0 回复次数:3 
scanf("%d%d",&a,&b)!=EOF 不懂,能解释给我听吗,谢谢
呵呵 如题啊
搜索更多相关主题的帖子: EOF scanf 解释 
2008-05-11 19:37
zhaoyg
Rank: 1
等 级:新手上路
帖 子:328
专家分:0
注 册:2006-8-28
收藏
得分:0 
Returns the number of fields successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. The return value is EOF for an error or if the end-of-file character or the end-of-string character is encountered in the first attempt to read a character.

from MSDN

麻雀飞上枝头变凤凰,而菜鸟的我飞上枝头却感冒了,为什么我的脑袋如此的不管用呢。
2008-05-11 19:51
kang216
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2008-4-29
收藏
得分:0 
[bo]以下是引用 [un]zhaoyg[/un] 在 2008-5-11 19:51 的发言:[/bo]

Returns the number of fields successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned.  ...

太专业了,看不懂
2008-05-11 21:06
meayer
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2008-9-13
收藏
得分:0 
LS是说scanf返回正确输入数据的个数,返回的值不包括读下来,但没分配给指定地址的数据.返回值为0表示没有任何一个数据被输入.如果出错,或在第一个字符被读入之前就遇到了输入缓冲的结尾或字符串的结尾,则返回EOF.
2008-09-13 02:11
快速回复:scanf("%d%d",&a,&b)!=EOF 不懂,能解释给我听吗,谢谢 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016704 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved