此问题在此处已有答案:
What’s the purpose of an exclamation mark at the start of a block comment? (That is, "/*! … */")(3个答案)
昨天关门了。
我在c++
中有一个头文件,其中函数的声明有以“!
“感叹号开头的块注解。
示例
class test{
public:
/*! @fn test::test()
@brief The basic constructor, which initializes the _test handle.
*/
test();
/*! @fn test::upload(std::string url)
@brief A function to execute a http POST request with the given url and image.
@param[in] url The url we are POSTing to
@return The response of the server
*/
std::string upload(std::string url);
}
此外,它还像这样更改VSCode中注解的颜色:
这些评论开头的感叹号是什么意思?
1条答案
按热度按时间cuxqih211#
这些注解针对的是从代码自动生成文档的Doxygen system。