🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.c
Article #707

Re: [Q] ファイルの特定の位置を変更

#707
From: Toyomi Nakayama
Date: Thu, 12 Mar 1998 00:00
26 lines
1723 bytes
中山と申します。

Junn Ohta wrote in message <6e7jt5$g5a@ns.src.ricoh.co.jp>...
>fj.lang.cの記事<3506A0D3.3AA59CDA@geocities.co.jp>で
> sierra@geocities.co.jpさんは書きました。
>> fopenで開きfseekで特定の位置に移動しfwriteで書き込んでfcloseで終了した
>> のですが、fwriteで書き込んだ位置以降が消えてなくなっています。
>
>ふつうはそうはならないと思うのですが...。
>
>MS-DOSかWindowsで、テキスト形式でファイルをオープ
>ンして一連の操作をしていたりしませんか? そうであれ
>ば、バイナリー形式でファイル操作をするようにプログ
>ラムを変更すれば解決できそうに思います。
>--


多分fopenの第2引数が"a"になっているのだと思うんですが・・・。
確かこういう場合は"r+"でないといけないような記憶が(不鮮明(T_T))
--
中山豊実@SoftwareSmith

toysmith @ mail.interq.or.jp <-ここから出しています。
toysmith @ coo.net           <-メールはこっちへお願いします。
                   容量でかいっす
Technical Details
Message-ID: <3507a7df.0@news.interq.or.jp>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3506A0D3.3AA59CDA@geocities.co.jp> <6e7jt5$g5a@ns.src.ricoh.co.jp>

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: 106434,8a84d598efbbed25
X-Google-Attributes: gid106434,public
From: "Toyomi Nakayama" <toysmith@mail.interq.or.jp>
Subject: Re: [Q] ファイルの特定の位置を変更
Date: 1998/03/12
Message-ID: <3507a7df.0@news.interq.or.jp>
X-Deja-AN: 333270102
Content-Transfer-Encoding: 7bit
References: <3506A0D3.3AA59CDA@geocities.co.jp> <6e7jt5$g5a@ns.src.ricoh.co.jp>
MIME-Version: 1.0
X-NNTP-Posting-Host: 210.172.161.86
Content-Type: text/plain; charset="iso-2022-jp"
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Newsgroups: fj.lang.c