
On Fri, Aug 8, 2008 at 6:46 PM, Dean Michael Berris <mikhailberis@gmail.com>wrote:
On Fri, Aug 8, 2008 at 1:28 PM, Alexander Dong Back Kim <alexdbkim@gmail.com> wrote:
What I want to ask here is how I can avoid to create a file and fill the data array instead by using boost serialization? Any comments will be appreciated.
Try using a stringbuf, then wrap it in an std::ostream, which you then use to initialize the archive:
std::stringbuf buffer; std::ostream stream(&buffer); text_oarchive archive(stream);
HTH
-- Dean Michael C. Berris Software Engineer, Friendster, Inc.
Thanks for the hint! Since I was deal with byte array I couldn't think about using stringbuf. However, I realized that char array is byte array anyway so stringbuf can be used anyway so your suggestion is perfectly suit for my case. Thanks a lot =) -- Alexander Dong Back Kim Australia +61 433 469 100 / Korea +82 10 6357 8840