本文介绍了开放,开放的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 任何人都可以让我解释一下打开/ " fopen"之间的差异。或读取/fread或或者写/ fwrite。 我知道打开 /"读" /写是系统调用和fopen /fread /fwrite是正常的库函数。 可能在内部必须调用fopen /"&的fread QUOT; /fwrite 函数。 但它与应用程序员有什么区别 透视?可以任何一个请解释一下这个? 谢谢。 干杯, 蓝色:)。 - 版权所有2004,所有错误都被逆转。 Peter Seebach / se***@plethora.net http://www.seebs.net/log/ - YA博客。 http://www.seebs.net/ - 主页。 C / Unix向导,亲商务激进,垃圾邮件战斗机。抵制Spamazon! 咨询,计算机,网络托管和shell访问: http ://www.plethora.net/ 解决方案 从C的角度来看,区别很简单:fopen (),fread(), fwrite()等存在,其余的不存在。 如果要编写可移植代码,请使用fopen ()等[1] HTH, --ag [1]当然,如果你*需要*在你的平台上使用任何平台特定的低级 级原语,一定要这样做 - 但是 关于它们的进一步问题将会关闭这里的主题。 - Artie Gold - 德克萨斯州奥斯汀 http://it-matters.blogspot.com (新帖子12/5) http: //www.cafepress.com/goldsays 从C的角度来看,区别很简单:fopen(),fread (), fwrite()等存在,其余的不存在。 如果要编写可移植代码,请使用fopen()等[1] HTH, --ag [1]当然,如果您*需要*使用您的平台上存在的任何平台特定的较低级原语,所有的方法都这样做 - 但是关于它们的进一步问题将不在这里。 fopen / fread / fwrite有缓冲区来固定I / O进程,但打开/读/写 dosen't 从C的角度来看,区别很简单:fopen(),fread (), fwrite()等存在,其余的不存在。 如果要编写可移植代码,请使用fopen()等[1] HTH, --ag [1]当然,如果您*需要*使用您的平台上存在的任何平台特定的较低级原语,所有的方法都是这样 - 但是关于它们的进一步问题将不在这里。 fopen / fread / fwrite有缓冲区来固定I / O进程,但是打开/读/写 写做?无处,因为甚至没有定义这样的功能。 他们做任何实现他们所做的事情,无论那是什么 它不是C问题。 如果打开怎么办?在某个平台上的功能弹出了CD盘上的托盘? C标准中有什么禁止它? - Jack Klein 主页: http://JK-Technology.Com comp的常见问题解答.lang.c http://www.eskimo.com /~scs/C-faq/top.html comp.lang.c ++ http://www.parashift.com/c++-faq-lite/ alt.comp.lang.learn.c-c ++ http:// www .contrib.andrew.cmu.edu / ~a ... FAQ-acllc.html Hi , Can any one please let me explain me the diffrences between "open"/"fopen" or "read"/"fread" or "write/fwrite". I know that "open" /"read" / "write" are system calls and "fopen"/"fread" / "fwrite" are normal library functions. May be internally must be calling "fopen" /"fread" / "fwrite"functions. But what difference does it makes from an application programmerperspective?Can any one please explain me about this ? Thank you. Cheers,Blue :).--Copyright 2004, all wrongs reversed. Peter Seebach / se***@plethora.net http://www.seebs.net/log/ - YA blog. http://www.seebs.net/ - homepage.C/Unix wizard, pro-commerce radical, spam fighter. Boycott Spamazon!Consulting, computers, web hosting, and shell access: http://www.plethora.net/ 解决方案 From a C perspective, the difference is simple: fopen(), fread(),fwrite(), etc. exist, the rest do not. If you want to write portable code, use fopen(), etc. [1] HTH,--ag [1] Of course, if you *need* to use whatever platform specific lowerlevel primitives exist on your platform, by all means do so -- butfurther questions about them will be off topic here. --Artie Gold -- Austin, Texas http://it-matters.blogspot.com (new post 12/5) http://www.cafepress.com/goldsays From a C perspective, the difference is simple: fopen(), fread(), fwrite(), etc. exist, the rest do not. If you want to write portable code, use fopen(), etc. [1] HTH, --ag [1] Of course, if you *need* to use whatever platform specific lower level primitives exist on your platform, by all means do so -- but further questions about them will be off topic here.fopen/fread/fwrite have buffer to fasten I/O process, but open/read/writedosen''t From a C perspective, the difference is simple: fopen(), fread(), fwrite(), etc. exist, the rest do not. If you want to write portable code, use fopen(), etc. [1] HTH, --ag [1] Of course, if you *need* to use whatever platform specific lower level primitives exist on your platform, by all means do so -- but further questions about them will be off topic here. fopen/fread/fwrite have buffer to fasten I/O process, but open/read/write dosen''t Where in the ISO C standard does it state what "open", "read" and"write" do? Nowhere, because such functions are not even defined.They do whatever the implementation says they do, and whatever that isit is not a C matter. What if the "open" function on some platform popped out the tray onthe CD drive? What in the C standard prohibits it? --Jack KleinHome: http://JK-Technology.ComFAQs forcomp.lang.c http://www.eskimo.com/~scs/C-faq/top.htmlcomp.lang.c++ http://www.parashift.com/c++-faq-lite/alt.comp.lang.learn.c-c++ http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html 这篇关于开放,开放的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-11 02:22