Not re-writing to a text file.
I have had a small program written for me that writes information to a text file and then uses it again later. I have tried to contact the original programmer but haven't been successful :(
My problem is that the text file is open at the start of the program
but the following code is used to put the information into the text file
fp = fopen("C:\\info.txt", "w"); //'W' should wipe any info already in file, 'A' is for append
which results on the information being appended to info.txt, not what I was after!
char *szData = g_Data.GetString();
My problem is - How do I delete what's in the file before I write the data to the file?