Raw pointers to prmitives can't be serialized without some extra effort. In your case, the easiet would be to create a string from your char data and serialize it. When you load it, deserialize to a string then take the pointer. Robert Ramey Surya Kiran Gullapalli wrote:
I've modified my code and did something like this.
std::stringstream ss ; boost::archive::binary_oarchive oa (ss) ; os << class_obj ;
so i'm sending data to db api as (void *)ss.
To retrieve data, I'm using something like this
data=db.get_data() ; istringstream is (ios_base::binary) ; is << (char *)data.get_data() ; boost::archive::binary_iarchive (is) ;
This time I'm getting stream_error exception.
what I'm not able to figure out was how can i create a stringstream object from void * pointer.
Thanks, Surya