Robert Ramey wrote
You really need to think about what void * means in your program. Usually it's just a place holder for any kind of pointer. Maybe you want to consider using boost::any instead of void *, (I don't know if serialization has been implemented for boost::any) or perhaps boost::variant which DOES have serialization implemented.
Robert Ramey _______________________________________________ Boost-users mailing list Boost-users@.boost http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi,Robert Ramey.I come back,when I discover about the boost::variant,I find
it cannot satisfy my request.
And finally I use vector to solve it,with the thinking that vector can store
memory.Cheers!
That's what I want to share,and maybe it's helpful to someone who want to
store a sequence raw data with serialization.
I create a vector like:
Engine::Uint8Vector dataVec((sizeof(type) /
sizeof(Engine::Uint8Vector::value_type)) * indexCount);
and then when I need the data to read or modify,just :
type * data = reinterpret_cast