i have a doubt.... please help........
consider a class (say item).... i write 10 objects of item into a file using write() function.....
how to delete a middle object(say 6th one) and join the 5th and 7th one?.....
i have a doubt.... please help........
consider a class (say item).... i write 10 objects of item into a file using write() function.....
how to delete a middle object(say 6th one) and join the 5th and 7th one?.....
You copy all the records you want to keep to a new file.
Then delete the old file, and rename the new file.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
thank u ...mr.salem.... please dont get irritated on seeing my following question.... since i am a novice to c++, i tend to ask this question....
how to delete a file completely? is it enough to over write the same file using write() fn with argument ios:ut | ios::trunc ?
please answer......
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
thank u very much.....