I just started file part in C++. I can edit record in file but when i delete problem's coming. I dont know how to set end of file in file. I mean say there are 5 records in employee file
Now i ask which employee name you want to delete . Now suppose that record is 2nd one so what is do is copy 3rd record to 2nd one 4th to 3rd one and 5th to 4th one. But the problem is that last record appears twice. I want to set end of file after 1st appearance of last record. Please tell me how can i do it?
And also if anybody has some other good way to delete records then kindly tell me that also.