delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
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'" <cygwin AT cygwin DOT com> |
Subject: | Re: File streams in C++ |
References: | <696BDC661BFCD411A8C90002A509489616DA3C AT bndkcopmex01 DOT barconet DOT com> |
From: | Benjamin Riefenstahl <Benjamin DOT Riefenstahl AT ision DOT net> |
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: | <ud7a7ehwd.fsf@work1.work.maz.net> |
Lines: | 32 |
MIME-Version: | 1.0 |
Hi Jacob, "Schultz, Jacob" <Jacob DOT Schultz AT barconet DOT 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 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |