views:

166

answers:

6
+1  Q: 

comments in C/C++

Hi there

I come from writing PHP code, and there I was using PHPDoc standards, in order to write comments in the code.

Now I'm trying to learn C/C++ (I'm using Visual Studio 2005), but I also wish to write good comments.

Is any standard to use or/and a tool which will automatize the documentation construction later?

many thx:)

+1  A: 

There is no standard, but there are many tools - take a look at Doxygen. The style of comments you use will be dependent on the tool you select.

anon
+6  A: 

Hi

Try using Doxygen for C/C++ documentation. I guess there is an add-on for Visual Studio also. Check out http://www.visualstudiogallery.com/ExtensionDetails.aspx?ExtensionID=7912ccf4-60b8-4132-bace-5acaceb7233b

cheers

Andriyev
+7  A: 

Try reading documenting for Doxygen. It can create documentation according to comments as well as cute little diagrams of your program structure with Graphviz.

Andrioid
A: 

I don't know about a standard with global acceptance but in most cases google convensions are accepted. It will be useful to you. Google Code Convensions

Chathuranga Chandrasekara
anon
A: 

Doxygen is great, or you can use the built in XmlDoc format within Visual Studio. There are a number of good tools you can then use to convert either of these formats into external (e.g. html or pdf) documentation.

Doxygen is covered above, but here's a link about XmlDoc format.

Jason Williams