🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #2467

IOManipulators with two arguments?

#2467
From: Dr. Richard Botting
Date: Wed, 08 Nov 1995 10:07
38 lines
1776 bytes
According to the 2nd addition of Horstmann's "Mastering C++",
	cout << setiosflags(ios::fixed, ios::floatfield);
is OK, but I found that it would not compile because the libraries
on our Gnu C++ n.m.0 do not have a two argument form of the
iomanipulator setiosflags.

In the draft standard/working papers (HTML version) I searched
for all occurences of setisoflags and failed to
find anything but a one argument form:
     smanip setiosflags  (ios_base::fmtflags mask);

Similarly for resetiosflags.

I presume that this is deliberate and that there is a
way of expressing the older pair of arguments in terms
of a single argument.

Am I right?
And if so... how does one do the euqivalent of
	cout.setf(ios:: F, ios::G);
by using
	cout<<setiosflags( X );



--
	dick@csci.csusb.edu=rbotting@wiley.csusb.edu.
Find out what's new at http://www.csci.csusb.edu/doc/www.sites.html
Disclaimer:`CSUSB may or may not agree with this message`.
Copyright(1995):Copy this freely but include the following link to the
<a href="http://www.csci.csusb.edu/dick/signature.html">author's signature</a>


---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <47or96$kct@news.csus.edu>
Path: arc1-ca.pugleaf.net!news.mindlink.net!agate!agate!Matt

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.mindlink.net!agate!agate!Matt
From: dick@silicon.csci.csusb.edu (Dr. Richard Botting)
Newsgroups: comp.std.c++
Subject: IOManipulators with two arguments?
Date: 08 Nov 1995 10:07:40 GMT
Organization: CS Dept., Calif. State Univ., San Bernardino
Approved: Matt@Austern
Message-ID: <47or96$kct@news.csus.edu>
NNTP-Posting-Host: austern.hip.berkeley.edu
Keywords: ios::left, ios::adjustfield setiosflags setf