Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com To: "'cygwin AT cygwin DOT com'" Subject: Re: File streams in C++ References: <696BDC661BFCD411A8C90002A509489616DA3C AT bndkcopmex01 DOT barconet DOT com> From: Benjamin Riefenstahl In-Reply-To: "Schultz, Jacob"'s message of "Fri, 20 Apr 2001 09:58:45 +0200" User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 Date: 20 Apr 2001 16:59:46 +0200 Message-ID: Lines: 32 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hi Jacob, "Schultz, Jacob" 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 Benjamin Riefenstahl mailto:benjamin DOT riefenstahl AT ision DOT 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