saveing class to binary file c++
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.
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.
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement