16 Jul
2005
16 Jul
'05
12:10 p.m.
Robert Ramey wrote:
This is a different problem.
DynamicArray<A> ArrayOfAs; ArrayOfAs.Element = new A[5]; ArrayOfAs.Size = 5; A* secondElement = &ArrayOfAs.Element[1];
std::stringstream stream; { boost::archive::text_oarchive oa(stream); oa & secondElement; // new object created here oa & ArrayOfAs; // attempt to reload an already loaded object
to new address - throw exception - pointer conflict
}
the following should work:
oa & ArrayOfAs; // load objects into array oa & secondElement; // load pointer to previouslt created object
Robert Ramey
yes, it is a different problem. Could you suggest a solution to it? Ivan PS: If the array comes first the problem doesn't appear.