简体   繁体   English

/ ++在c ++中的含义是什么

[英]what does /** mean in c++

I was trying to add a block comment in c++, but I made a type-o and wrote /** instead of /* . 我试图在c ++中添加一个块注释,但我创建了一个类型-o并写了/**而不是/* I noticed that the comment inside got in bold. 我注意到里面的评论以粗体显示。 Does anyone know what it means? 有谁知道这意味着什么?

This form of comment is used by Doxygen - This software enables one to generate documentation for the source code. Doxygen使用这种注释形式 - 该软件可以生成源代码的文档。 Please see the web site. 请访问网站。

I guess your IDE understands this. 我想你的IDE理解这一点。

To expand on the Doxygen and JavaDoc answers. 扩展DoxygenJavaDoc的答案。
These are the special comment blocks, that your editor may be able to detect. 这些是您的编辑器可能能够检测到的特殊注释块。

/**
 * ... Javadoc comment ...
 */

/*!
 * ... Qt style comment ...
 */

*intermediary starts are optional *中间开始是可选的


///
/// ... Doxygen supported ...
///

//!
//! ... Doxygen supported ...
//!

Keep in mind, from the C++ language standard, these are all just regular comments. 请记住,从C ++语言标准来看,这些都只是常规注释。

In Java this comment style /** indicates that the comment is a javadoc , maybe your editor is trying to make a similar distinction. 在Java中,这个注释样式/**表示注释是一个javadoc ,也许你的编辑器试图做出类似的区分。 I know that at least the Eclipse IDE will exhibit this behavior. 我知道至少Eclipse IDE会出现这种行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM