Boost logo

Boost Users :

From: Mark Wyszomierski (markww_at_[hidden])
Date: 2007-01-12 14:01:51


Hi Levent,

Thanks for the quick reply. I see what you mean. Anytime I open up a
stream I now pass the ios_base::binary flag to the stream constructor.
Still the same runtime error though. All I had to do to my example was
the following, right?:

    std::ofstream ofs("filename", ios_base::binary);

        and

    std::ifstream ifs("filename", ios_base::binary);

Thanks,
Mark

On 1/12/07, Server Levent Yilmaz <leventyilmaz_at_[hidden]> wrote:
>
>
> On 1/12/07, Mark Wyszomierski <markww_at_[hidden]> wrote:
> > Hi,
>
> Hi Mark,
>
> > with (very short sample app). Can anyone see what I'm doing wrong, or
> > if there is an error with the boost code?
>
> No the boost code is OK. and in fact you are lucky that you get this error.
> If you look real closely to the "binary" output file you'll see that a byte
> that reads OA has been replaced by OD OA.
>
> Use std::ios::binary, or rather std::ios_base::binary, when you create the
> ofstream as well.
>
> hth,
> - levent
>
>
> --
> Server Levent Yilmaz
> Mechanical Engineering @ PITT
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net