Doxygen 笔记

                     

贡献者: addis

   例子

代码 1:factorial.hpp
/**
 * @brief Calculates the factorial of a number.
 *
 * @details This function calculates the factorial of a non-negative integer
 * using a recursive approach.
 *
 * @note The function does not handle negative inputs.
 *
 * @param n The number to calculate the factorial for.
 * @return The factorial of the number.
 *
 * @code
 * int result = factorial(5); // result will be 120
 * @endcode
 *
 * @see https://en.wikipedia.org/wiki/Factorial
 */
inline int factorial(int n);

inline int factorial(int n) {
    if (n <= 1) return 1;
    return n * factorial(n - 1);
}

1. 安装使用

图
图 1

                     

© 保留一切权利