Microsoft Visual Studio: How to keep the console open without manually reading input?

后端 未结 6 560
轮回少年
轮回少年 2021-01-18 13:20

I\'m writing some C++ with Microsoft Visual Studio 2010 Express, and I\'m wondering if there is a way to display command output somewhere in the IDE instead of an external c

6条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-18 13:49

    In VC++ use

    Console::WriteLine(L"my error text");
    

    Printf won't produce any output. Neither will OutputDebugString. The Console will write at the bottom of the test results output, so all you have to do is double-click on the test in the "Test Results" window.

提交回复
热议问题