2
我的意思是,我们总是得到这样的代码:如何更改在Visual Studio 2015中打开C++代码的默认新项目?
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
int main()
{
return 0;
}
有什么办法来改变这种到另一个代码?所以,当我开始一个新项目,我总是想要得到的东西是这样的:
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
return 0;
}
我知道这是不是一个很大的区别,但我真的不想总是编辑,有时无聊
您可能需要阅读[为什么使用命名空间std是不好的做法(http://stackoverflow.com/questions/1452721/why-is -using-namespace-std-considered-bad-practice) – rustyx
你想把#include放在stdafx.h预编译的头文件中,而不是别的地方。 –
您可以创建自己的模具,而不是Microsoft为您生成一个模具。好处是你可以使用你的编码标准而不是微软的标准。创建模具文件。在编辑之前复制它们。 –