Boost logo

Boost :

Subject: [boost] [endian] cooperation with iostream
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2008-11-21 07:54:25


Dear Beman,

In my recent work on the zoneinfo database for the date_time library, I have
tried the current endian-0.8 from sandbox in order read big endian data.

I had partial success. Although I see a working example based on the cstdio
function calls, I am primarily using an ifstream to read a binary file. I
haven't been able to figure out on how to get ifstreams working in
combination with big endian types. (By the way, perhaps in conjunction with
iostreams, it would be nice if std::ios::big_endian would exist, and be done
with it?)

Is it possible to use the endian library in combination with bniary iostreams?
If so, would it be possible to give an example on how that should look like?

Thanks,
Kind regards,

Rutger


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk