What is the Best Practice for Combating the Console Closing Issue?(解决控制台关闭问题的最佳实践是什么?)
问题描述
编译控制台程序后,控制台窗口在运行后立即关闭.保持开放的最佳做法是什么?我已经搜索了谷歌负载,我已经习惯了你不必担心的代码块,但是,我想稍微弄乱一下 Visual Studio 和 VS,我的控制台关闭了.在整个 interwebz 上,有几种不同的方法可以让它保持打开状态,但是,我读过它们中的大多数都是糟糕的编码技术.大家喜欢的方法是什么?
After compiling console programs the console window closes immediately after running. What is the best practice for keeping it open? I've searched google loads, I'm used to codeblocks where you don't have to worry about it, but, I want to mess around with Visual Studio a bit and with VS, my console closes. All over the interwebz there are several different ways to keep it open, however, I've read that most of them are bad coding techniques. What is everyones preferred method?
推荐答案
当我使用 Visual Studio 并且不需要调试时,我只需使用 Ctrl+F5 击键 –它可以防止控制台关闭.
When I'm using Visual Studio and I don't need debugging I just run it using Ctrl+F5 keystroke – and it prevents console from closing.
这篇关于解决控制台关闭问题的最佳实践是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:解决控制台关闭问题的最佳实践是什么?


基础教程推荐
- 如何在不破坏 vtbl 的情况下做相当于 memset(this, ...) 的操作? 2022-01-01
- Windows Media Foundation 录制音频 2021-01-01
- 从 std::cin 读取密码 2021-01-01
- 为 C/C++ 中的项目的 makefile 生成依赖项 2022-01-01
- 如何“在 Finder 中显示"或“在资源管理器中显 2021-01-01
- 如何使图像调整大小以在 Qt 中缩放? 2021-01-01
- 为什么语句不能出现在命名空间范围内? 2021-01-01
- 使用从字符串中提取的参数调用函数 2022-01-01
- 管理共享内存应该分配多少内存?(助推) 2022-12-07
- 在 C++ 中循环遍历所有 Lua 全局变量 2021-01-01