TVS wrote:
file handling in c++ using ifstream and ofstream is creating a
problem when i wanted to write to a file using <ofstream>.write() member
function. When I try to retrieve it back using an read() memeber for
an ifstream object i am not able to find any data in the object.
I would guess that you don't open the files in binary mode: this may
indeed mess up some the data. Otherwise, I would expect that saving
PODs in binary mode should work as long as you stay on the same
machine,
the same compiler version, etc. In general, you should, however, format
your data even when using a binary format.
What exactly is your problem and what does your code look like: with
the information you provided we cannot do much more than guess what
you try to do.
--
<mailto:di***********@yahoo.com> <http://www.dietmar-kuehl.de/>
<http://www.contendix.com> - Software Development & Consulting