26 Jun
2008
26 Jun
'08
5:16 p.m.
Just hand roll your own. Look at vector serialization to see how that works. Then just allocate the required space and loop through. Basically, just re-implement the code in vector serialization using a dynamically allocated array. Robert Ramey michalurbanski wrote:
Thanks for the reply.
Is there any way to make it work if I want to allocate a block of memory which size depends on the other serialized elements?
For example, how do I deserialize an object with attribues constructed like this:
Test(int a, int b) { this->a = a; this->b = b; this->c = new float[a*b]; }
Robert Ramey