documenting with doxygen

For my projects I want to document my code with doxygen. I ask me, where to put the comments which will read out by the doxygen parser. I could put the comments either within my declarations (header files) or within my .cpp files. When I choose to add them into the header files, I perceive that the code gets cluttered. But I want to document the interfaces of my classes and functions, so I shun for putting the comments into my .cpp files.

So where should I put the documentation of my code?
Hello nuderobmonkey,

I am not familiar with "doxygen" other than what I have read, but it looka like it may be worth installing just to play with.


So where should I put the documentation of my code?


Any where you need to. I believe the idea is to write comments that will create something like a users guide or instructions on how to use the program.

At first this may have comments throughout the code, but with time you will find a balance that will work.

Andy
If you want to use that kind of tool, I advise the .h file, since that is what you share in a library or where programmers look first even if they have source. A heavily documented header file is indeed cluttered. Notepad++ and make the comment color the same as the background color lets you see the code with excess 'whitespace', sometimes that helps when trying to work, or you can write a comment remover if you need a version to read with only code, etc. Or collapseable editors let you hide groups of lines. Something like that can help.
Topic archived. No new replies allowed.