Article View: borland.public.cppbuilder.nativeapi
Article #11212how to delete entry from binary file
From: ScOe
Date: Fri, 20 Feb 2004 00:28
Date: Fri, 20 Feb 2004 00:28
8 lines
1263 bytes
1263 bytes
I'm using fwrite to write structure to file, I also use fread to retreive it. But i dont know how to delete it. For example i write few objects into file, and than i want to delete 5th object from file. I set pointer to that position as: fseek(stream, sizeof (myStruct) * objectnum, 0); after that i want to delete sizeof (myStruct) number of bytes from file. How ?
Technical Details
Message-ID:
<40355519@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,8399063c6dc327e5,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-02-19 16:39:51 PST From: "ScOe" <cbinders@hotmail.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: how to delete entry from binary file Date: Fri, 20 Feb 2004 01:28:55 +0100 Lines: 11 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 193.198.140.41 Message-ID: <40355519@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1077237017 193.198.140.41 (19 Feb 2004 16:30:17 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail