Archived

This topic is now archived and is closed to further replies.

Update header

This topic is 5310 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites