Re: setfill


[ Follow Ups ] [ Post Followup ] [ CS1044 Web Discussion Board ] [ FAQ ]

Posted by William D McQuain on October 05, 2001 at 10:19:16:

In Reply to: Re: setfill posted by wayne on October 04, 2001 at 13:32:50:

: bernard,
: the setfill() command should come before the setw() command.

Actually that doesn't matter... but the rest of the answer is exactly on target.

then you need to reset the setfill() command after doing that, other wise, all spaces will be displayed with the current setfill() value.
: thus:
: out << right << setfill('0') << setw(2) << 5 << <: will display 05 and all other spaces will be a blank space until you set it to something else.

: wayne




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS1044 Web Discussion Board ] [ FAQ ]