Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 8th, 2008, 12:25 PM
vova777@gmail.com
Guest
 
Posts: n/a
Default Re: Predictably formated output with std::cout?

On Jul 7, 6:21*pm, r...@zedat.fu-berlin.de (Stefan Ram) wrote:
Quote:
* Possibly, you can create a new ostream object associated with
* stdout and then use this with custom settings instead of cout.
That is as simple as -

std::ostream out(std::cout.rdbuf());

out << "state free formatted output";

Kind regards,
Vladimir
  #2  
Old July 8th, 2008, 08:25 PM
Carsten Fuchs
Guest
 
Posts: n/a
Default Re: Predictably formated output with std::cout?

Hi all,

thank you very much to everyone for your answers, they helped a lot!

The boost stream-state saver library sounds good, but I guess that the own ostream instance as
described by Vladimir and Ali, that is:

vova777@gmail.com wrote:
Quote:
std::ostream out(std::cout.rdbuf());
out << "state free formatted output";
is what I was looking for and fits my case best.

Many thanks for your help!

Best regards,
Carsten
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 network members.
Post your question now . . .
It's fast and it's free

Popular Articles