Connecting Tech Pros Worldwide Help | Site Map

setw, width

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 19th, 2005, 06:48 PM
Marc Schellens
Guest
 
Posts: n/a
Default setw, width

Is there an defined standard behaviour if I set in
an iostream the field width to zero or to an negative value?
(ie. using the natural with of the output object or similar)
thanks,
marc


  #2  
Old July 19th, 2005, 06:48 PM
Attila Feher
Guest
 
Posts: n/a
Default Re: setw, width

Marc Schellens wrote:[color=blue]
> Is there an defined standard behaviour if I set in
> an iostream the field width to zero or to an negative value?
> (ie. using the natural with of the output object or similar)[/color]

Zero seems to be the "natural width" in the standard. About negative
values... only a comment says that negative values are only used (for the
type streamwidth) in one case, and that is not width (or precision). I did
not read every page (it is huge) but it seems that all the standard says is
that width sets the minimum width. IMHO this means that negative numbers
should behave the same as 0, but I might be wrong.

--
Attila aka WW


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.