|
Boost Users : |
From: David Guardado (unmais_at_[hidden])
Date: 2006-08-15 18:03:49
Hello,
I would really appreciate some help with this error:
"Unhandled exception at 0x7c812a5b in Alchera.exe: Microsoft C++ exception:
boost::archive::archive_exception @ 0x0012e5c0."
I am making a Visual C++ 7.1 / MFC program using Boost for
serialization. The relevant code is as follows:
// Ecosystem.h
#include <fstream>
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
class Ecosystem
{
private:
...
friend class boost::serialization::access;
...
public:
...
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & this->intMember;
}
...
};
// CDocumentDerived.h
#include "Ecosystem.h"
class CDocumentDerived
{
Ecosystem* ecosystem;
...
};
// CDocumentDerived.cpp
#include <fstream>
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
...
CDocumentDerived::Foo()
{
std::ofstream ofs("savedmodel.mdl")
boost::archive::text_oarchive oa(ofs);
oa & *(this->ecosystem); //
******************* exception arises here
}
The exception arises during de execution of the instruction marked
with "***************/" in the code.
Has anybody any idea?
Thanking you in advance,
David
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