Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我有这样的事情:
while (scanf("somepattern",arg1,arg2)==2) { if(arg1==0) break; <code here> } if(scanf("someotherpattern")==1) { <code here> }
我的问题是:匹配所有等于 2 的模式后,scanf文件中指向的函数在哪里?它是否消耗了“0” if?
scanf
if
导致匹配失败的字符仍然未读。标准在描述中多次这样说fscanf。
fscanf