Jump to content
  • Advertisement
Sign in to follow this  
MiiJaySung

Boost serialization with char*

This topic is 4808 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Excuse me in advance if this is a dumb question. For a start I'm new to C++, and secondly I'm naturally dumb (and no I'm not blonde) Anyway, when ever I try and serialize a char* data type in boost, I get ".\boost_1_32_0\boost\serialization\access.hpp(106): error C2228: left of '.serialize' must have class/struct/union type" I tried includiong the string serializer for the std::string by slapping #include <boost/serialization/string.hpp> at the top. That doesn't do anything and I wasn't expecting it as this is char* and not std::string. I know I could use std::string in place, but I don't want to do that if possible.

Share this post


Link to post
Share on other sites
Advertisement
Also, when using STL containers and serialization, I get a errors like ...

Warning:
.\boost\serialization\collections_save_imp.hpp(36): warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data

and more importantly

Error:
.\boost\serialization\split_free.hpp(55): error C2780: 'void boost::archive::load(Archive &,T &)' : expects 2 arguments - 3 provided

Can anyone tell me why this is. I did something or other and it managed to get rid of this error in one part of my code, but I dunno how I got rid if it now.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!