L
L
Loligan2015-05-19 11:35:00
OOP
Loligan, 2015-05-19 11:35:00

Where can I find a normal C++ serialization example?

Help me find a normal class serialization example for c++. Everywhere some raw pieces of code. Or it is desirable that there was a well-explained lesson.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Adamos, 2015-05-19
@Adamos

IMHO, the normal serialization of a class for C ++ is the serialize () method prescribed in this class and the constructor of this class, which receives data in the format in which this method produces them.
Any other options - a direct road to the rake.

M
maaGames, 2015-05-19
@maaGames

boost::serialization
And examples and descriptions and lessons - a lot!
But you can’t write “serialize the class for me, quick!”, but you have to write on your own what exactly and in what order will be serialized / deserialized. Serialization to binary and text (xml) formats is possible.
There is native support for std::string. Polymorphic serialization requires a bit more information to be provided, but there is support too.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question