Jump to content
  • Advertisement

Archived

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

krumms

fwrite/fread and classes

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

What is actually written to a file when you use fwrite to store a class in a file? For example, is the vtbl pointer stored in there as well? Function addresses? or are only data members stored? Sorry the wording for the question is a bit awkward - and I''m certain it''s an easy enough question Thanks

Share this post


Link to post
Share on other sites
Advertisement
Hmm okays thanks ...

I did a quick check with a float an integer and a character in a class with nothing but a constructor, and the only thing that was somewhat strange was the fact that the character was padded with three 0xCC bytes ... *shrugs* anyways, thanks

Tom

Share this post


Link to post
Share on other sites
It likes to work in multiples of four, so those extra three pad bytes were added to make things neat. And padded.

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!