Microsoft Visual Studio:如何保持控制台打开,而无需手动读取输入? [英] Microsoft Visual Studio: How to keep the console open without manually reading input?
问题描述
我正在使用Microsoft Visual Studio 2010 Express编写一些C ++,我想知道是否有一种方法可以在IDE中的某处显示命令输出,而不是外部控制台窗口,或至少保持该窗口打开。 / p>
从STDIN读取东西将用于控制台应用程序,但这是一个单元测试用例,我不想修改生成的main函数。有其他方法吗?
Ctrl + F5
快速测试。
组合键会让控制台保持打开状态,直到您关闭。
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 console window, or at least keep that window open.
Reading something from STDIN would work for a console application, but this is a unit test case and I don't want to modify the generated main function. Is there another way?
Ctrl + F5 for quick test. The key combination keeps the console open until you close it.
这篇关于Microsoft Visual Studio:如何保持控制台打开,而无需手动读取输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!