您的位置:首页 > 产品设计 > UI/UE

vs2010运行没有“press any key to continue...”

2014-03-23 18:35 399 查看
在程序后面加一句 system("pause");  暂时是这样么解决的。

下面这段来自http://linuxmanong.diandian.com/post/2010-06-05/6474282   但是试了没起作用。。

这个是来自微软官方的高手提供的解决方案,本人已经测试成功,和大家分享,下面的是原文: 

Missing "press any key to continue..." when lauching with CTRL+F5 
The following bug, closed as fixed in Visual Studio 2010 RC, is still there:  https://connect.microsoft.com/VisualStudio/feedback/details/521838/vc-program-launch-with-option-start-without-debugging-would-not-pause-before-exit?wa=wsignin1.0#tabs  In my Makefile project, if I start the program without debugging (CTRL+F5), it always (per default) closed the opened
console window. I compared my project file to a standard console application project file, and found the following: 
<ItemDefinitionGroup> 
<Link> 
<SubSystem>Console</SubSystem> 
</Link> 
</ItemDefinitionGroup> 
Inserting this (using a text editor) under <Project> in my makefile project .vcxproj file solves the problem ... It
would make sense that is the default behavior (as it is in my vs2005), or that this could be controlled from the standard project dialog. 

这里用图片和中文文字解说一下吧 ,供大家参考也便于我以后的使用 
1.找到你的工程目录找到.vcxproj文件,将它用记事本或其他的文本编辑打开,记住不用vs2010打开哦,那样只是打开工程。 
2.找到如下的一行 
</Project> 

其实这个是在打开的文件的最后,ok了,记下来,你把上面的  蓝色的文字  copy到</Project>的前面保存,就可以了,这样就可以和以前的vs2005/2008一样了。 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  visual studio 2010