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.
这篇关于解决控制台关闭问题的最佳实践是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:解决控制台关闭问题的最佳实践是什么?
基础教程推荐
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- 初始化列表*参数*评估顺序 2021-01-01
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
- CString 到 char* 2021-01-01
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
