-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Baranowski, Daniel Sent: Wednesday, October 11, 2006 2:06 PM To: boost-users@lists.boost.org Subject: [Boost-users] [Serialization] Serializing to a void * and a size?
I guess my questions is, what's the best way to serialize to a void * and a size? I'm pretty illiterate on streams, so I've started to read up on it, but I haven't figured it out yet, though I feel that's probably where the answer lies.
std::ostringstream sTestBinary1; boost::archive::binary_oarchive oa(sTestBinary1); oa << *pA;
// Get the size of the buffer and a pointer to it size_t iSize = 0;//sTestBinary1.size(); // ?? How do I get the size ?? void * pVoid = sTestBinary1.rdbuf(); // ?? Is this the right pointer ??
[Nat] Are you familiar with the std::ostringstream::str() method?