Update header
Hi!
I have here an file with a header like this:
struct MyHeader
{
unsigned int a;
unsigned int b;
char* c;
};
Then i have a file with the header and it follows a 57 MB big data chunk. How can i change now the value b in MyHeader, without write the whole file. I am using fopen, fclose,... functions to handle files.
Thanks, Christian
quote:Original post by Jan Wassenberg
RTFM. fopen and fseek.
I know what he mean “read the fucking manual”.
1 Open file read header 2 fseek beginning 3 write header. Done
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement