www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/25/15:57:00

From: "Niklas Pettersson" <npedt97 AT student DOT vxu DOT se (nospam)>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Beginer file i/o help
Date: Sat, 25 Mar 2000 17:01:42 +0100
Organization: Lund Institute of Technology, Sweden
Lines: 21
Message-ID: <8bintn$i8m$1@news.lth.se>
References: <euPC4.5262$K9 DOT 55528 AT typhoon DOT nyroc DOT rr DOT com>
NNTP-Posting-Host: npedt97.univ.vxu.se
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I think you'll have to do the "down-pushing" by your self. That is read data
from the file and write in to another file or keep it in memory. Write
everything to file until that point where the new data should in. Write the
new data and then continue to write the rest of the data. You can probably
design some nice classes that makes this work "hidden" from the programmer.

/ Niklas


"John" <fubu36 AT stny DOT rr DOT com> wrote in message
news:euPC4.5262$K9 DOT 55528 AT typhoon DOT nyroc DOT rr DOT com...
> How would I be able to read and write to the same file so that when a
> certain number or character is found it would write out another number to
> the next line pushing everything down 1 line farther?
>
> so that in something like a database I would be able to jump to a certain
> point in the file and add more data to it. Thanks
>
>


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019