funny looking comments - c++

两盒软妹~` 提交于 2021-01-19 22:31:50

问题


when i read through source files of opensource projects i often come across some weird phrases in the comments

/*       
@brief ......  
@usage.....  
@remarks....  
@par....  
*/

questions
1.What are they?(were not mentioned when i was learning c++)
2.Do they have any documentation(where)


回答1:


They are just comments and as such have no special meaning in C++. They are probably to allow a documentation generator (For example Doxygen) to extract the data from the comments.




回答2:


Those are for some flavour of automatic documentation generator. Another program runs through the code looking for comments of like you see there. The @... keywords identify how the documentation should be laid out, and that program generates pretty HTML or printed documentation directly from the source code. It's a way to keep the docs up-to-date with the code more easily.



来源:https://stackoverflow.com/questions/2530466/funny-looking-comments-c

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