This message was edited by AsmGuru62 at 2003-12-8 12:46:29
: OK, I just read on the MSDN that opening a file with "fopen()" and using the mode "a+" will not allow you to over-write data in a file. I have just made an MP3 tag editor, and I need to over-write data with it. I don't know the format of the encoded data, so I can't buffer the entire file to memory and then burst it into a new file, but I do know the EXACT locations of the data I want to modify. How can I do this?
:
: -
Sephiroth
:
FILE* pFile = fopen ("any file name here", "r+b");
fseek (pFile, 1762, SEEK_SET);
// ^^^ go to exact location of 1762 bytes
// from the beginning of the file
// write a few (five symbols) bytes at this location:
fwrite ("Hello", sizeof (char), 5, pFile);
fclose (pFile);