对控制台进行永久性更改 [英] Making permanent changes to Console

查看:65
本文介绍了对控制台进行永久性更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,我是编程新手。我正在使用Visual Studio社区和C ++编码。

Hey guys, I'm new to programming. I'm using Visual Studio Community and coding in C++.

所以,我打开程序,然后选择New Project>空项目。

So, I open the program, then select New Project > Empty Project.

在解决方案资源管理器下,在源文件下,我添加一个新的C ++文件(.cpp),然后开始编码。

Under Solution Explorer, under Source Files, I add a new C++ File(.cpp) and then start coding.

我之后我已完成输入我的代码(我知道这是正确的,当然),我构建了一个解决方案。

After I've finished typing my code (which I know is correct, for sure), I build a solution.

选择'开始调试'或'开始不调试'会
NOT 
让控制台保持打开状态。

Choosing to either 'Start Debugging' or 'Start Without Debugging' does NOT keep the console open.

所以我必须转到属性>链接器>系统,然后将SubSystem(从空白)更改为控制台(/ SUBSYSTEM:CONSOLE)。

So I have to go to Properties > Linker > System, then change SubSystem (from a blank) to Console (/SUBSYSTEM:CONSOLE).

这解决了我的问题。但是,每次我开始一个新项目时我都要继续这样做。

This solves my problem. However, I have to keep doing this every time I start a New Project.

有没有办法将它设置为新项目的默认值?

Is there any way to set this as a default for a new project?

提前感谢您的任何答案。

Thanks for any answers in advance.

推荐答案

哦,顺便说一句,如果我尝试New Project> Windows控制台应用程序,我遇到问题,它创建了我必须始终保持删除的ConsoleApplication1.cpp,但也包括#include" stdafx.h"行。我宁愿开始一个空的
项目来避免这个问题(除非有人知道如何解决这个问题)
Oh, and btw, if I try New Project > Windows Console Application, I get problems whereby it creates ConsoleApplication1.cpp which I have to always keep deleting, but to also include the line #include "stdafx.h". I would prefer to start an empty project which avoids this problem (unless anyone knows how to fix that)


这篇关于对控制台进行永久性更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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