[C++-sig] Re: Stdout from c++

David Abrahams dave at boost-consulting.com
Wed Nov 5 18:08:42 CET 2003

Stefan Seefeld <seefeld at sympatico.ca> writes:

> Oliver Walczak wrote:
>> Dear list,
>> I'm quite new to programming c++ extensions for python (not to the c++
>> Language itself) and i'm wondering what might be the simplest way to make
>> simple string output to sys.stdout from the c++ api. Can anybody give me a
>> hint? I used iostream and cout until now and this works well in the command
>> shell, but not running the idle console under windows.
> short answer: get a better OS.
> long answer: if the OS has the concept of an output stream, and its
>               (buggy) std::cout implementation doesn't connect to it,
>               write your own streambuf that writes to this output
>               stream, then redirect std::cout to use your streambuf.

This is pure platform bigotry.

The OS doesn't have a std::cout implementation, buggy or otherwise.
That is a function of your compiler and its standard library

Dave Abrahams
Boost Consulting

More information about the Cplusplus-sig mailing list