Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > Re: testing str...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 9521 of 9823
Post > Topic >>

Re: testing stream "binariness"

by alasham.said@[EMAIL PROTECTED] Apr 21, 2008 at 12:17 PM

On Apr 19, 1:20 am, Anthony West <w...@[EMAIL PROTECTED]
> wrote:
> Is there a way to test a stream for binariness? Specifically: given an
> ofstream, is there some method I can call (or some member I can access)
> that tells me if the ofstream was opened in binary mode?
>
> If not, why?

{ Do not quote extraneous material, such as the clc++m banner,
   which has been removed by the moderator. -mod }

I do not think there is such a method. You could wrap up std::ofstream
inside another class that then keeps the desired information: file-
name, i/o mode, etc. As for why the class is designed this way,
perhaps the reason is mentioned in "The Design and Evolution of C++".

Regards

-- 
      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 2 Posts in Topic:
testing stream "binariness"
Anthony West <west@[EM  2008-04-18 17:20:45 
Re: testing stream "binariness"
alasham.said@[EMAIL PROTE  2008-04-21 12:17:10 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 1:33:54 CDT 2008.