On May 8, 2007, at 7:11 AM, Peter Seebach wrote:

> In message <1178575386.966256.131060 / e65g2000hsc.googlegroups.com>,  
> ray writes:
>> Can I use rdoc to generate documentation for c and C++ sources?  If
>> so, how do I mark the comments?
>
>> /* ???? */
>> void main() {
>>  ...
>> }
>
> *AHEM*.
>
> "int main".
>
> (See the comp.lang.c FAQ.)
>
> -s
>
What PS is saying is, unless you're using a really old compiler and  
system (really really old) ...
main is a function that always returns int. Not void. Though some  
compilers are kind of forgiving and will change it internally to int  
anyway, just use int.

The answer is yes for C and I don't know for C++
visit:
http://rdoc.sourceforge.net/doc/index.html

Also take a look at some of the docs generated by any gem that uses C  
code in a C file.
This will give you plenty of info.
Do pay close attention to the style of C used. Like styles of writing  
in human languages, C has many styles and the style used by the Ruby- 
Core commiters is the style you can expect RDOC to like best.