Sign in to follow this  
ryan20fun

saveing class to binary file c++

Recommended Posts

Hi all,
If any of you noticed I have posted 3 questions in the wrong forum, which I am apologise for and
Hope-fully won't do it again.
Now my question

I am trying to save some game settings n a bnary file but I think it isn't working 100%
Becouse the window caption is stored in the settings fle and the capton shws squers and a letter,
The overiew of the code is as follows

I create a fstream object set it up
The use the write function, for the first parameter I use reinterprit_cate

Anf that is just about all the code that I use or it
Thank for the awnsours.

Share this post


Link to post
Share on other sites
Most C++ classes you just can't reinterpret_cast and have it work with fstream::write(). You need to think about the actual data involved. For an overview of the topic see this.

Share this post


Link to post
Share on other sites
You could consider using the C++ Middleware Writer. It's an on line code generator that writes low-level C++ marshalling code based on high-level user input. There are advantages to using the C++ Middleware Writer over other serialization libraries.

I'm interested in helping people get started using the C++ Midleware Writer. I'm willing to donate 20 hours a week for six months on the right project. Let me know if you agree with the following and are interested in my offer.

Therefore, a man should endeavor to marry the daughter of a Torah scholar, marry his daughter to a Torah scholar, eat and drink with Torah scholars and do business with Torah scholars.


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this