在查看之前关闭C ++窗口 [英] Closing of C++ windows before viewing

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

问题描述

您好

我刚开始学习C ++。这很有趣,但我更喜欢使用visual studio而不是其他编译器。所以问题是我的练习程序到目前为止在其他编译器上运行正常但在Visual Studio上我无法看到输出,因为它在执行后几乎立即关闭
。请协助,因为它令人沮丧。

I just began learning C++. It is interesting but i prefer using visual studio rather than other compilers. So the problem is that my exercise programs so far run fine on other compilers but on Visual Studio i cannot get to see the output as it closes almost immediately after execution. Please assist because it's demoralizing.

谢谢。 

推荐答案

您好,

没有让士气低落的地方,简单地说,如果我没有看到任何一个命令可以停止(暂停/通过键盘输入,循环,...)我的代码,到达主要结束后它将关闭。没有士气低落,但却是真的。

there's no place for demoralizing, simply if I don't see no one command that can stop (pause/input via keyboard,loop,...) my code, after reach end of main it will close. Not demoralizing but true.

更新:如果使用PAUSE,你必须至少包含iostream库。

Update: in case of using PAUSE, you must include iostream library for minimum, I think.


这篇关于在查看之前关闭C ++窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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