Boost logo

Boost Users :

Subject: Re: [Boost-users] serialization error for a struct
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-03-13 18:36:04


AMDG

alev mutlu wrote:
> I am very new to boost. I am getting a serialization error, and I have no
> idea about what to do
>
> #include <boost/serialization/string.hpp>
> //some other headers
>
> struct field {
> std::string field_name;
> std::string field_type;
> std::string field_ref;
> std::string field_colType;
> };
>
> int main(int argc, char* argv[]){
>
> vector<field> C;
> // other definitions
> // populating the C vector
>
> scatter(world, C, relMyValues, w_mySize, 0);
>
> }
>
> and I got
> error: struct field has no member named serialize
>
> what should I do?
>

You should define a serialize function. See
http://www.boost.org/libs/serialization/doc/tutorial.html#simplecase
for an example.

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net