🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: IOManipulators with two arguments?

#2558
From: Bernd Eggink
Date: Mon, 13 Nov 1995 17:22
34 lines
1511 bytes
Dr. Richard Botting (dick@silicon.csci.csusb.edu) wrote:

[ ... ]

>  Meanwhile, things like the following seem to work nicely:
>  ostream& left(ostream& out) //set left justified
>  {	
>  	out.setf(ios::left, ios::adjustfield);
>  	return out;
>  }
>  Giving
>  	cout << hex << left << 12345;

>  However I am suspicious of easy solutions these days, so
>  what have I missed?

It's OK (even in C++ there are some cases which look simple _and_
work). In fact, the forthcoming standard library will contain a
manipulator for each flag bit - left, right, fixed and so on.

	Bernd

--
+----------------------------------+
|          Bernd Eggink            |
|    Rechenzentrum Uni Hamburg     |
| admin@rzaix13.rrz.uni-hamburg.de |
+----------------------------------+

---
[ 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: <487lnt$lo@rzsun02.rrz.uni-hamburg.de>
Path: arc1-ca.pugleaf.net!128.32.155.1!matt
References: <47or96$kct@news.csus.edu> <47slkd$p5@rzsun02.rrz.uni-hamburg.de> <47tikm$45b@news.csus.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!128.32.155.1!matt
From: admin@rzaix13.uni-hamburg.de (Bernd Eggink)
Newsgroups: comp.std.c++
Subject: Re: IOManipulators with two arguments?
Date: 13 Nov 1995 17:22:54 GMT
Organization: University of Hamburg -- Germany
Approved: matt@physics2.Berkeley.EDU (Matt Austern)
Message-ID: <487lnt$lo@rzsun02.rrz.uni-hamburg.de>
References: <47or96$kct@news.csus.edu> <47slkd$p5@rzsun02.rrz.uni-hamburg.de> <47tikm$45b@news.csus.edu>
NNTP-Posting-Host: physics2.berkeley.edu