Hallo.
Does anyone have any handy hints or pointers to handy hints as to how I could open a file for reading, locate a point in the file, and edit the characters there on the fly?
Usually, I'd open the file as an ifstream, read everything into a buffer, alter the buffer, then put it all back with alterations by writing it all back over the original with an ofstream.
But this time, I need a file that several users' applications are going to want to update, so it will need to be opened in protect mode. I don't want other users with an update pending to have to hang about for ages (there will be alot of information in this file), so it would be best if I could make the update as fast as possible.
Any help gratefully received.
Cheers,
Douglas JL
PS - did anybody clock my threads on sockets & TClient socket?
Common sense is what tells you the world is flat.
Does anyone have any handy hints or pointers to handy hints as to how I could open a file for reading, locate a point in the file, and edit the characters there on the fly?
Usually, I'd open the file as an ifstream, read everything into a buffer, alter the buffer, then put it all back with alterations by writing it all back over the original with an ofstream.
But this time, I need a file that several users' applications are going to want to update, so it will need to be opened in protect mode. I don't want other users with an update pending to have to hang about for ages (there will be alot of information in this file), so it would be best if I could make the update as fast as possible.
Any help gratefully received.
Cheers,
Douglas JL
PS - did anybody clock my threads on sockets & TClient socket?
Common sense is what tells you the world is flat.