Topic: Detect if a file is opened with binary mode?


Author: "song@iso.iso.unibas.ch"@ubaclu.unibas.ch
Date: 1996/05/14
Raw View
Relay-Version: ANU News - V6.1B9 05/16/94 VAX/VMS; site yogi.urz.unibas.ch
Path: iso.iso.unibas.ch!song
Newsgroups: comp.std.c++
Subject: Detect if a file is opened with binary mode?
Message-ID: <1996May14.100654.46465@yogi.urz.unibas.ch>
From: song@iso.iso.unibas.ch (Song Jin)
Date: 14 May 96 10:06:54 MET
Nntp-Posting-Host: iso.iso.unibas.ch
X-Newsreader: TIN [version 1.2 PL2]
Lines: 10

How can I detect if a fstream is opened with binary mode? Since 'open_mode'
is an enum, I can only set the file open mode via iso::binary, but I cannot
find out if a file is opened with iso::binary or not. Doese anybody have an
idea? Why does fstream is designed so?

Song JIN
song@iso.iso.unibas.ch

Please cc a copy of your answer directly to my Email address, since my
news server deletes postings very frequently.
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]