
Hello, I try to use serialization of boost. I have started with the exemple of bus stop in XML : http://www.boost.org/libs/serialization/example/demo_xml.cpp I have added to this example a map of 1000 bus_schedule. Then I save this map in a file. And I relaod this file in a new map. This works perfectly in XML, but if I try : binary_iarchive I got an boost::archive::archive_exception at memory location 0x00dfdb40.. I don't understand why It woks in XML and not in binary. I have attached to the mail the source file. If someone could help me It would be great ! Thanks. -- Christophe Loustaunau.

-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of christophe loustaunau Sent: Wednesday, February 20, 2008 11:27 AM To: boost-users@lists.boost.org Subject: [Boost-users] Serialization problem
Hello,
I try to use serialization of boost. I have started with the exemple of bus stop in XML : http://www.boost.org/libs/serialization/example/demo_xml.cpp
I have added to this example a map of 1000 bus_schedule. Then I save
Hi Christophe, At a first guess, could you try creating your fstreams with std::ios::binary? s this
map in a file. And I relaod this file in a new map. This works perfectly in XML, but if I try : binary_iarchive I got an boost::archive::archive_exception at memory location 0x00dfdb40..
I don't understand why It woks in XML and not in binary. I have attached to the mail the source file.
If someone could help me It would be great !
Thanks.
-- Christophe Loustaunau.
******************************* This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.

are you sure that the underlying stream was opened with ios::binary?
Robert Ramey
"christophe loustaunau"

Like you and Sebastian said I forgot to open the stream with ios::binary.
Thanks a lot for your answers !
It works !
--
Christophe Loustaunau.
2008/2/20, Robert Ramey
are you sure that the underlying stream was opened with ios::binary?
Robert Ramey
"christophe loustaunau"
wrote in message news:ca77b27f0802200227n2bb4a4d0mf1b365e7eaad626b@mail.gmail.com... Hello, I try to use serialization of boost. I have started with the exemple of bus stop in XML : http://www.boost.org/libs/serialization/example/demo_xml.cpp
I have added to this example a map of 1000 bus_schedule. Then I save this map in a file. And I relaod this file in a new map. This works perfectly in XML, but if I try : binary_iarchive I got an boost::archive::archive_exception at memory location 0x00dfdb40..
I don't understand why It woks in XML and not in binary. I have attached to the mail the source file.
If someone could help me It would be great !
Thanks.
-- Christophe Loustaunau.
------------------------------
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
christophe loustaunau
-
MOSS Sebastian
-
Robert Ramey