Chetan Raikwar
Chetan Raikwar

Reputation: 27

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.

Upvotes: 2

Views: 231

Answers (1)

rory.ap
rory.ap

Reputation: 35260

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.

Upvotes: 3

Related Questions