what does /** mean in c++

陌路散爱 提交于 2019-12-14 01:44:59

问题


I was trying to add a block comment in c++, but I made a type-o and wrote /** instead of /*. I noticed that the comment inside got in bold. Does anyone know what it means?


回答1:


This form of comment is used by Doxygen - This software enables one to generate documentation for the source code. Please see the web site.

I guess your IDE understands this.




回答2:


To expand on the Doxygen and JavaDoc answers.
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.




回答3:


In Java this comment style /** indicates that the comment is a javadoc, maybe your editor is trying to make a similar distinction. I know that at least the Eclipse IDE will exhibit this behavior.



来源:https://stackoverflow.com/questions/36192264/what-does-mean-in-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!