473,385 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Deletion In Files Hendeling In C++

How can i delete an object which stored at 24th location. and the size of each object is 12. and total size of file is 48.
plz give me the function or code by which i can delete that object whithout affecting other elments.
Dec 4 '07 #1
3 1247
hanaa
44
I think, one leaves the element tht is to be deleted and copies the rest into a new file. Then you delete old file and rename the new file with the old file's name. Tht's wht i did, in a miniproject.
But there could be better options. I think you should wait for another solution
Dec 4 '07 #2
weaknessforcats
9,208 Expert Mod 8TB
Usually you overwrite the record to be deleted by charaters not likely to be valid data characters, like 032. And that's all you do.

Later you can run a reformat utility that will copy the file skipping the delete characters.
Dec 4 '07 #3
my problem is solved
thanks
Dec 5 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: jeff | last post by:
Hiya I just woundering how would I go about detecting addition, deletion or change to files in a folder? Ideally id like to look at a linux directory and say watch all its contents and then...
0
by: Vic | last post by:
Hi all, When I test the Delete multi table function in MySQL, DELETE table_name ...] FROM table-references I accidentally delete all data in one table. All data in that table are gone...
3
by: jaws | last post by:
My problems is as follows. Hope you guys can provide some insight. 1. I have a class which opens a file and simply spits out the text. Methods in place to open, print, close, and delete the...
7
by: Diggler | last post by:
I have a web application that allows a user to manage files on the server. On the page is a counter that tells them how many files are in their folder. When you delete a file from the folder using...
3
by: A_Republican | last post by:
I am interested in writing my own secure file deletion program. I want to be able to read and write to my hard drive directly. My application will seach my hard drive for all locations marked for...
7
by: Sanket80 | last post by:
Hi I need one small help in VB I have written a macro which produces some output and stores them in the form of an excel files (about 10 files are generated) in a particular directory in C:\....
9
by: Pete90 | last post by:
Recently, I came across an article that even if we delete the files from our hard disk, the files can still be retrieve later by digital forensics experts. Formatting the hard drive also does not...
1
by: Riky | last post by:
hi i have a windows application. I am select the folder or file name from the folderbrowserdialog box and to delete the folder or file i am calling the following code. Public Function...
0
by: shivaranjaniadimulam21 | last post by:
Hello, As per the new restrictions on vista I am now creating my application files in Application.CommonAppDataPath folder but now the next problem is I am not able to delete few files created...
1
by: miztaken | last post by:
Hi there, My C# application opens a directory and deals with the files inside it. But at the mean time i can delete the directory from windows. Is there any way i can restrict the deletion of that...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.