06.11.2010, 18:27
Because this is what fwrite does. Use fread to read the file into a string, use format (like format(....,"%s\n%s, FileContent, StringToStoreInFile) ) and then use fwrite. It will replace the text that was in the file, with the stuff you've read from the file and the String you want to store in the file.