Boost serialization with char*
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement