fopen()问题。 [英] fopen() question.

查看:58
本文介绍了fopen()问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新手在这里...


我读到fopen()的描述让我期待,

模式为w ,如果它不存在,它将创建一个文件。检查了

常见问题解答并没有看到这个问题得到解决。什么我不明白?


谢谢,


朗费罗

Newbie here...

My reading of the description of fopen() led me to expect that, with
mode as "w", it would create a file if it did not exist. Checked the
FAQ and did not see this question addressed. What don''t I understand?

Thanks,

Longfellow

推荐答案

朗费罗< no*@this.address>写道:
Longfellow <no*@this.address> writes:
我对fopen()的描述的阅读使我期望,当
模式为w时,如果文件不存在,它将创建一个文件。检查了
常见问题解答并没有看到这个问题得到解决。我不明白什么?
My reading of the description of fopen() led me to expect that, with
mode as "w", it would create a file if it did not exist. Checked the
FAQ and did not see this question addressed. What don''t I understand?




一切都必须在FAQ中吗?你的C库文档

应该提到这一点,所以没有必要提供常见问题解答来提供它。这是我的

系统上的库文档的摘录:


``w''''将文件截断为零长度或创建文本文件用于写作。

流位于文件的开头。


实际上,第一句是标准的几乎直接引用

(单词file只在原文中出现一次。)


DES

-

Dag-Erling Sm?rgrav - de *@des.no




在文章< 86 ************ @ xps.des.no>中, de * @ des.no (=?iso-8859-1?q?Dag-Erling_Sm = F8rgrav?=)写道:

In article <86************@xps.des.no>, de*@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) writes:
Longfellow< no*@this.address>写道:
Longfellow <no*@this.address> writes:
我对fopen()的描述的阅读使我期望,当
模式为w时,如果文件不存在,它将创建一个文件。


如果可以的话。 fopen()可能会失败。

查看常见问题解答并没有看到这个问题。
My reading of the description of fopen() led me to expect that, with
mode as "w", it would create a file if it did not exist.
If it can. fopen() may fail.
Checked the FAQ and did not see this question addressed.



什么问题?

做一切必须在常见问题解答中?


What question?
Does everything have to be in the FAQ?




你的问题是什么? 我检查了常见问题解答是一个完美的

合理,有礼貌的评论。没有电话抱怨

它。让我们不要劝阻人们在发布前阅读常见问题解答。


如果OP想解释他的问题是什么,我是
$ b $确定我们很乐意提供帮助。


-

Michael Wojcik mi ************ @ microfocus.com


我说,''我需要把我的灵魂投入到我的工作中,众所周知,计算机没有灵魂。我父亲说,''美国人正在工作

。在上面。'' - Sue Townsend,_阿德里安鼹鼠的秘密日记,13岁3 / 4_



And what''s *your* problem? "I checked the FAQ" is a perfectly
reasonable, indeed polite, remark. There''s no call to complain about
it. Let''s not discourage people from reading the FAQ before posting.

If the OP would like to explain just what his question is, I''m
sure we''d be glad to help.

--
Michael Wojcik mi************@microfocus.com

I said, ''I need to put my soul into my work and it is well known that
computers haven''t got a soul.'' My father said, ''The Americans are working
on it.'' -- Sue Townsend, _The Secret Diary of Adrian Mole, Aged 13 3/4_


2005-05-04,Michael Wojcik< mw *****@newsguy.com>写道:


< snip>
On 2005-05-04, Michael Wojcik <mw*****@newsguy.com> wrote:

<snip>
如果OP想解释他的问题是什么,我确定我们'很乐意提供帮助。
If the OP would like to explain just what his question is, I''m
sure we''d be glad to help.




谢谢。

写入模式下的
fopen()确实会打开一个新文件一个不存在。

如果一个人的代码是正确的,那就是......;)抱歉这个不必要的帖子。


朗费罗



Thanks.

fopen() in write mode does indeed open a new file if one does not exist.
If one''s code is correct, that is... ;) Sorry for the unnecessary post.

Longfellow


这篇关于fopen()问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆