seekg() puts the internal file pointer at the place in the file you specify. Then you can read from that point to examine the field that is there.
As for deleting a particular record, you need to read in the data into a string, change it, then write it back to the file. I don't think you can selectively write to a spot in a file--everything after that spot gets erased when you write.
|