I have a chunk of bytes taken from a recording file that represents a C++ object. I’ve been given the class definition for the object. How do I convert the data(chunk of bytes) to an object?
I keep seeing references to boost but don’t think I can use it since it was not used to serialize the object to begin with.
Anyone? Thanks.
You’re correct — Boost.Serialization can’t help you deserialize an object it didn’t serialize. You’ll need to do unformatted input with
std::ifstream(calling itsreadmember function to extract byte ranges). Be sure to open the stream in binary mode.