简体   繁体   中英

How to add a comment “by default” in a source file in visual c++ 2010

I want to know how to add a "default" comment in visual studio 2010. Just like in netbeans etc, when we make a new source file , a "default comment" is added in the beginning.

example:

/* owner: xyz */
/* date: xxyyzz */  

#include<stdio.h>
{

}

How to add such comments automatically whenever a new source file is created?

please also tell where to find options within menus etc, Visual studio is too huge to explore.

You can modify the item template, or create your own item template to accomplish this. See my answer to this question if you want to modify the built-in item template:

How to modify default properties of new WinForm in visual studio

Or if you want to create your own item template, you can build it from scratch in VS, then use "Export Template" from the "File" menu. The wizard will walk you through it, so I won't go into detail about that here, but I will say that it will give you the option of adding the template to your "installed templates" in addition to exporting it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM