Does anyone know if its possible to open a file for appending but then I need to be able to replace the last character written to the file with another. How can I advance the pointer going backwards towards the start of the file and write to each character that I would like to change ? I am also closing the file after each write or a single character then opening it with the append mode set.
It would be good if you read the whole file in memory, change/replace whatever you want and than again write back to the file.
Opening the file for each character is going to be very slow operation.