Jump to content
  • Advertisement


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

Austrian Coder

Update header

This topic is 5614 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
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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!