I tried serialization, but every time I got stuck in errors, for example: -
error: 'class std::vector<int, std::allocator<int> >' has no member named 'serialize'
here is my source code and serialization method knowing that i am using boost.serialize
template <class E, class T> class heap{ vector<E> * hp; int index;
then I changed this line ar and hp; in
for(int i = 0; i < hp->size(); i++) ar & hp->at(i);
I had even worse mistakes, for example
/../../../../boost/boost_1_48_0/boost/archive/text_oarchive.hpp:100: undefined reference to `boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::text_oarchive_impl(std::ostream&, unsigned int)' debug/main.o: In function `~text_oarchive_impl': Qt_4_8_0__4_8_0__Debug/../../../../boost/boost_1_48_0/boost/archive/text_oarchive.hpp:85: undefined reference to `boost::archive::basic_text_oprimitive<std::ostream>::~basic_text_oprimitive()' Qt_4_8_0__4_8_0__Debug/../../../../boost/boost_1_48_0/boost/archive/text_oarchive.hpp:85: undefined reference to `boost::archive::basic_text_oprimitive<std::ostream>::~basic_text_oprimitive()'
source share