【发布时间】:2019-10-24 11:41:00
【问题描述】:
我想在每次创建新项目时禁用 Visual Studio 自动生成的 cmets。 Visual Studio 的示例模板如下所示。我不想要这些 cmets 中的任何一个。谢谢你的帮助。
`
// ex6_page174.cpp : This file contains the 'main' function. Program
execution begins and ends there.
//
#include "pch.h"
#include <iostream>
int main()
{
std::cout << "Hello World!\n";
}
// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu
// Tips for Getting Started:
// 1. Use the Solution Explorer window to add/manage files
// 2. Use the Team Explorer window to connect to source control
// 3. Use the Output window to see build output and other messages
// 4. Use the Error List window to view errors
// 5. Go to Project > Add New Item to create new code files, or Project >
Add Existing Item to add existing code files to the project
// 6. In the future, to open this project again, go to File > Open >
Project and select the .sln file
`
【问题讨论】:
-
很奇怪。按 F5 执行代码。您在哪里/在哪里看到自动生成的 cmets?没有遇到过这个,我也使用(d)VS2017 企业版。但我主要是从头开始编写代码。
-
我已经编辑了我的问题以便更好地理解
-
我怀疑“项目模板”是否有帮助。不确定。
-
什么意思?我创建了项目,这个不必要的 cmets 看起来像“//入门提示”,我不想要它们。就是这样。
-
只需创建空项目并添加和命名您想要的任何文件。这些模板,启动项目,是为新手准备的。谁想用 Hello World 开始一个项目,除非他们对 VS 或编码完全陌生。我通常也不使用 pch 文件,因此以这种方式启动项目需要清理结构并删除 pch 选项。
标签: c++ visual-studio comments enterprise