Mail Archives: djgpp/1998/07/10/15:05:10
Stefan Ahl wrote:
>
> Hi,
>
> I am a beginner in daily C++ programming.
> My OO experience is build on Java.
> Now I try to serialize objects within a way I have read
> in the book 'C++ in 21 days'.
>
> Imagine You have an object of type person and You want
> to store it on disk. You should be able to do that like this:
[snipped]
> That is the description of the said book.
> But it does not work that way. The ofstream is not able to write
> an object to a file.
Shot in the dark: Are you using the latest version of GCC/libstdc++?
(2.8.1) The old 2.7.x versions had a bug in the C++ library where (I
seem to recall) binary opens of streams would be done wrong.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -