开发者

MSVC++ more than one console window

In MSVC++ you can summon a console window to your app by running:

开发者_如何学编程// Attach a console
AllocConsole() ;
AttachConsole( GetCurrentProcessId() ) ;
freopen( "CON", "w", stdout ) ;

Now printf and cout automatically go to that window.

Is it possible in MSVC++ to have more than one console window?


Don't think so but there are a few logging libraries that give you a console-like dos box that you can stream messages to. You could have lots of these if you just one a number of separate output consoles.


According to AllocConsole documentation:

A process can be associated with only one console

So I don't think you can use multiple consoles. MSVC++ is not responsible for this, it's a Win32 limitation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜