This is the mail archive of the
mailing list for the Cygwin project.
Re: File streams in C++
"Schultz, Jacob" <Jacob.Schultz@barconet.com> writes:
> stream.open ("test.txt");
> file = fopen ("test.txt","r");
Your code opens the file in text mode.
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
Harburger Schlossstr. 1
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple