On 1 Jan 2006 19:29:46 -0800 in comp.lang.c++, "la*****@gmail.com"
<la*****@gmail.com> wrote,
Hmm thanks... it seems to work but it always modifies the last variable
in the struct at the last record such that it contains a random value.
As a sidenote, is the ios::binary flag optional then?
No, I should have written ios::in|ios::out|ios::binary. But you
already had that part. You should open in the correct mode to be
correct, but some systems may have no actual difference between text
and binary.
What's that about random values? Mind your seekp() and seekg()s,
and post example code if you still have trouble.