Does C supports an equivalent of the tripl开发者_Go百科e-slash, XML Documentation Comments that Visual Studio uses to provide helpful tooltips for my code in C#, or am U just spoiled by being able to use them in C#?
If it's not supported in C, are there other options?
C does not have any equivalent of XML documentation comments or JavaDoc.
Try doxygen.
In the C language itself, a triple-slash comment is nothing special (they're just double-slash comments that happen to start with a slash).
However, you can use triple-slash comments with Doxygen.
Most modern C compilers will understand double-slash comments like in C++. They are part of the C99 spec.
Presumably you're talking about creating comment blocks that are formatted for automated extraction.
Doxygen supports special comment blocks that start with a double-slash C++ comment delimiter, followed by either another slash, or an exclamation mark.
C supports /* */
comments. C99 adds support for //
comments. Your IDE or compiler may support more, but that is non-standard.
精彩评论