结果关闭窗口的输出 [英] Output of result closing window

查看:54
本文介绍了结果关闭窗口的输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在读一本名为21天内学习C的书。并且我注意到

,每次我编程的东西,我试图打开它,它出现一个

瞬间然后关闭。在某些程序中你应该输入一些东西,例如你的年龄或体重,它可以让我继续允许我这样做。
这样做。但是一旦我点击输入按钮显示答案

或输出该框就关闭了。我有点怀疑

如何运行程序我刚刚打开程序.exe。也许我打开它是错误的,或者我需要做些什么才能解决这个问题。请帮帮我。

解决方案

当你应该做的是从命令行打开它时,你可能正在从Windows资源管理器中打开它。



我一直在读一本名为21天学习C的书。并且我注意到

,每次我编程的东西,我试图打开它,它出现一个

瞬间然后关闭。在某些程序中你应该输入一些东西,例如你的年龄或体重,它可以让我继续允许我这样做。
这样做。但是一旦我点击输入按钮显示答案

或输出该框就关闭了。我有点怀疑

如何运行程序我刚刚打开程序.exe。也许我打开它是错误的,或者我需要做些什么才能解决这个问题。请帮帮我。



最后一个人说的是什么,或者你是从调试器运行的。在主函数的末尾添加一个断点,或在离开主函数之前请求用户输入以防止窗口关闭。



Adrian


好吧,我很喜欢编程。命令行与命令提示符相同,如果是,我如何从中访问程序。如果不是我如何访问命令行。


I have been reading a book titled "Learn C in 21 days" and ive noticed
that everytime i program something I try to open it and it comes up for a
split second then closes. In some programs where you are supposed to
enter something for instance your age or weight it stays up to allow me
to do that. But once i hit the enter button for it to display the answer
or output the box just closes. i was a little skeptical on exactly how
to run the program I have just been opening the program .exe. perhaps i
am opening it wrong or there is something that I need to do in order to
fix this. Please help me out.

解决方案

Whats happening is you are probably opening it up from Windows Explorer when what you should be doing is opening it from the command line.


I have been reading a book titled "Learn C in 21 days" and ive noticed
that everytime i program something I try to open it and it comes up for a
split second then closes. In some programs where you are supposed to
enter something for instance your age or weight it stays up to allow me
to do that. But once i hit the enter button for it to display the answer
or output the box just closes. i was a little skeptical on exactly how
to run the program I have just been opening the program .exe. perhaps i
am opening it wrong or there is something that I need to do in order to
fix this. Please help me out.

What the last guy said, or you are running it from the debugger. Put a break point at the end of the main function, or request input from the user before leaving the main function to keep the window from closing.


Adrian


Alright im very new to programming. is the command line the same thing as the command prompt and if so how do i access a program from it. if it isnt how do i access the command line.


这篇关于结果关闭窗口的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆