🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11214

Re: how to delete entry from binary file

#11214
From: Remy Lebeau (TeamB)
Date: Fri, 20 Feb 2004 01:26
20 lines
1664 bytes
"ScOe" <cbinders@hotmail.com> wrote in message
news:40355519@newsgroups.borland.com...

> But i dont know how to delete it.

You can't "delete" anything from a file.  You will have to create a
temporary file, copy over the data that you want to keep, and then replace
the original file with the temporary.  Unless the undesirable data is at the
very end of the file, in which case you can simply truncate the existing
file.

> For example i write few objects into file, and than i want
> to delete 5th object from file.

Create a new file that contains a copy of items 1 through 4 and 6 through
the end of the file.


Gambit
Technical Details
Message-ID: <40356075$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newshosting.com!nx01.iad01.newshosting.com!news2.euro.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40355519@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,8399063c6dc327e5
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-02-19 17:39:47 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <40355519@newsgroups.borland.com>
Subject: Re: how to delete entry from binary file
Date: Thu, 19 Feb 2004 17:26:44 -0800
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.138.253
Message-ID: <40356075$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1077239925 67.22.138.253 (19 Feb 2004 17:18:45 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newshosting.com!nx01.iad01.newshosting.com!news2.euro.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail