添加Doxygen注释的示例

This commit is contained in:
2022-05-04 16:24:05 +08:00
parent ff721884d4
commit dce94dcac3
2 changed files with 14 additions and 0 deletions

View File

@@ -3,6 +3,11 @@
// //
#include "example.h" #include "example.h"
/**
* @brief 在stdin打印一个字符串
*
* @param str 指向需要打印的字符串指针
*/
void print(char* str) void print(char* str)
{ {
printf("%s", str); printf("%s", str);

9
main.c
View File

@@ -1,7 +1,16 @@
#include "example.h" #include "example.h"
/**
* @brief 程序的主函数
*
* @return int 程序结束的状态0表示成功
*/
int main() int main()
{ {
/**
* @brief 需要输出的字符串
*
*/
char* string = "Good morning!\n"; char* string = "Good morning!\n";
print(string); print(string);
return 0; return 0;