Oct 30, 2002 #1 marie325 Technical User Oct 30, 2002 1 US How can I capture the current setfill char before I change it so I can change it back before my function ends?
How can I capture the current setfill char before I change it so I can change it back before my function ends?
Nov 1, 2002 #2 xwb Programmer Jul 11, 2002 6,828 GB C++ stream manipulation is an absolute pain. The only way I know of doing this is to write a wrapper for setfill that stores the fill characters so that they can be queried. Upvote 0 Downvote
C++ stream manipulation is an absolute pain. The only way I know of doing this is to write a wrapper for setfill that stores the fill characters so that they can be queried.
Nov 2, 2002 #3 chipperMDW Programmer Mar 24, 2002 1,268 US Or you could call the fill() member function of the stream, which returns the current fill character. If you're going to be doing a lot of saving the states of your iostreams, I'd suggest Boost's io library at http://www.boost.org. They have some state saver classes already written. Upvote 0 Downvote
Or you could call the fill() member function of the stream, which returns the current fill character. If you're going to be doing a lot of saving the states of your iostreams, I'd suggest Boost's io library at http://www.boost.org. They have some state saver classes already written.