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

致读者: 小时百科一直以来坚持所有内容免费无广告,这导致我们处于严重的亏损状态。 长此以往很可能会最终导致我们不得不选择大量广告以及内容付费等。 因此,我们请求广大读者热心打赏 ,使网站得以健康发展。 如果看到这条信息的每位读者能慷慨打赏 20 元,我们一周就能脱离亏损, 并在接下来的一年里向所有读者继续免费提供优质内容。 但遗憾的是只有不到 1% 的读者愿意捐款, 他们的付出帮助了 99% 的读者免费获取知识, 我们在此表示感谢。

                     

友情链接: 超理论坛 | ©小时科技 保留一切权利