Capturing cout in Visual Studio 2005 output window?

后端 未结 7 1609
北海茫月
北海茫月 2020-12-05 15:15

I created a C++ console app and just want to capture the cout/cerr statements in the Output Window within the Visual Studio 2005 IDE. I\'m sure this is just a setting that I

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-05 15:21

    A combination of ben's answer and Mike Dimmick's: you would be implementing a stream_buf_ that ends up calling OutputDebugString. Maybe someone has done this already? Take a look at the two proposed Boost logging libraries.

提交回复
热议问题