我不能运行这个程序 [英] I can t run this program
本文介绍了我不能运行这个程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我第一次使用visual studio而且我无法理解为什么我无法运行它
这就是它显示的内容:
线程0x2178已退出,代码为0(0x0)。
线程0xd78已退出,代码为0(0x0)。
线程0xa94已退出代码0(0x0)。
程序'[11288] hello world.exe'已退出,代码为0(0x0)。
解决方案
这可能是一个控制台应用程序,它启动和停止的速度很快,控制台窗口只是屏幕上的一个闪光灯。 在
main函数退出之前插入对请求控制台输入(例如,getchar(),_ getch())的函数的调用。 这样您就可以在按键响应之前查看控制台上程序的输出,以允许程序继续正常退出。 另一种常见的方法是在退出之前在主函数
中放置一个断点,以便控制台窗口仍然可见,并在程序终止之前输入调试器。
This is my first time i am using visual studio and i can t understand why i can t run it
this is what it is showing:
The thread 0x2178 has exited with code 0 (0x0).The thread 0xd78 has exited with code 0 (0x0).
The thread 0xa94 has exited with code 0 (0x0).
The program '[11288] hello world.exe' has exited with code 0 (0x0).
解决方案
Chances are that this is a console application and it is starting and stopping so quickly that the console window is just a flash on the screen. Insert a call to a function that requests console input (e.g., getchar(), _getch() ) right before the main function exits. This will allow you to see the output of the program on the console before responding with a key press to allow the program to continue to its normal exit. Another common method is to place a breakpoint in the main function right before it exits so that the console window is still visible and the debugger is entered right before the program terminates.
这篇关于我不能运行这个程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文