This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: File streams in C++
Hi Jacob,
"Schultz, Jacob" <Jacob.Schultz@barconet.com> writes:
> stream.open ("test.txt");
> [...]
> file = fopen ("test.txt","r");
>
Your code opens the file in text mode.
> <<test.txt>>
Your file is not a text file (despite the name).
Look into your favorite C++ tutorial or reference on how to open files
in binary mode. If it doesn't talk about this distinction, throw it
away and get a better book.
In addition you may want to look at the cygwin FAQ at
http://www.cygwin.com/faq/. I just checked and the entry "How is the
DOS/Unix CR/LF thing handled?" applies.
so long, benny
--
ISION Internet AG
Benjamin Riefenstahl
mailto:benjamin.riefenstahl@ision.net
Harburger Schlossstr. 1
D-21079 Hamburg
http://www.ision.net
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple