From: DavMac AT iname DOT com (Davin McCall) Newsgroups: comp.os.msdos.djgpp Subject: Re: Binary and Text Files Date: Tue, 24 Aug 1999 10:18:40 GMT Organization: Monash Uni Lines: 32 Distribution: world Message-ID: <37c2710d.36895459@newsserver.cc.monash.edu.au> References: NNTP-Posting-Host: damcc5.halls.monash.edu.au X-Trace: towncrier.cc.monash.edu.au 935489859 21289 130.194.198.138 (24 Aug 1999 10:17:39 GMT) X-Complaints-To: abuse AT monash DOT edu DOT au NNTP-Posting-Date: 24 Aug 1999 10:17:39 GMT X-Newsreader: Forte Free Agent 1.1/32.230 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com (At least in C): Most file reading operations will translate the standard DOS "carriage-return,line-feed" combination into a plain line-feed on a read and vice-versa on a write when dealing with a file opened in text mode. In binary mode, there is no such conversion performed. Davin. On Tue, 24 Aug 1999 01:33:05 -0700, "Al Morgan" wrote: >This is probably a stupid question, but what's the difference between >opening a file in binary mode as opposed to text mode? > >ifstream binary_file; >binary_file.open("info.dat", ios::binary); > >as opposed to > >ifstream text_file; >text_file.open("info.dat"); // text is the default. > >Thanks in advance > Al [muaddib AT proaxis DOT com] > > __________________________________________________________ *** davmac - sharkin'!! davmac AT iname DOT com *** my programming page: http://yoyo.cc.monash.edu.au/~davmac/