I am using turboC++ compiler. I am dealing with files, having a large numbe of records( in five figures). I have stored all the records in form of class objects, using write(). Though I can't be sure of this, but I think that I have written the records properly. But while reading them, I am facing problems. Someimes, it is not reading at all, sometimes, it is reading it a bit incorectly, like, I have some string members also, so, the string is shifted by 1 character. I am reading them using read() only.
I remember, once my teacher in school told me that in file handling, it is advisable o create a dummy record and then delete it, before writing into the file for the very first time.
I don't know the reason.
Anyways, I have tried that also, still no use.
If anyone of you can help even a little bit, please do reply.