Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Persistent ios::setw()

Reply
Thread Tools

Persistent ios::setw()

 
 
Martin Magnusson
Guest
Posts: n/a
 
      07-13-2004
Sending setw() to an ostream (for formatting numerical output etc.) only
affects the next field. Is there no way to set width and padding more
permanently?

Thanks,
martin
 
Reply With Quote
 
 
 
 
Mike Wahler
Guest
Posts: n/a
 
      07-13-2004

"Martin Magnusson" <(E-Mail Removed)> wrote in message
news:3dRIc.4909$(E-Mail Removed)...
> Sending setw() to an ostream (for formatting numerical output etc.) only
> affects the next field. Is there no way to set width and padding more
> permanently?


'width(0)' is called automatically after insertions.
The fill character remains the same until explicitly
changed.

-Mike


 
Reply With Quote
 
 
 
 
Fraser Ross
Guest
Posts: n/a
 
      07-13-2004
Write an overloaded operator for insertion. I am not sure what happens for
built-in types since there is already overloaded functions for them. It is
a tricky function to write. Normally it returns a reference to the stream
and it is a friend.

Fraser.


 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Persistent field and Persistent properties - difference gk Java 7 10-12-2010 09:43 PM
Cisco dialer-persistent reconnect delay Sascha E. Pollok Cisco 1 03-20-2006 06:49 PM
why's my bridge un-persistent? dmorgan1 Wireless Networking 0 08-02-2005 07:50 AM
PIX to PIX Easy VPN: how to make connection persistent / auto-reconnect ?? [iMpLoDe] Cisco 4 01-17-2005 05:19 AM
Web Framework with stateful sessions / persistent object space? Marc Floessel Perl 0 07-09-2004 10:04 AM



Advertisments