A bit of binary I/O
Jarrett Billingsley
kb3ctd2 at yahoo.com
Sat Jan 20 21:41:06 PST 2007
"Heinz" <billgates at microsoft.com> wrote in message
news:eoualo$1rcv$1 at digitaldaemon.com...
>
> Wow, that covers all, thanks for your reply.
>
> But, can i still write an entire structure with writeExact()? or you
> suggest writting each member of the structure with write()?
Yeah, that's perfectly fine as long as the structure doesn't contain any
reference members (pointers, class references, dynamic arrays). Binary
files a lot of times have some kind of standard header which can be written
or read in one big chunk, which is possible to do with a structure.
But if the structure contains any reference members, writing it out with
writeExact will not work, and you'll have to write out the members manually.
More information about the Digitalmars-d-learn
mailing list