Re: setfill


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

Posted by wayne on October 04, 2001 at 13:32:50:

In Reply to: setfill posted by bernard farley on October 04, 2001 at 10:59:10:

bernard,
the setfill() command should come before the setw() command. 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 ]