警告:未找到使用 betty 兼容语法的函数 main 的描述 [关闭]

问题描述 投票:0回答:1

我正在学习编程语言 C 并使用 Betty 编码风格编写 C github.com/holbertonschool/betty),

我一直收到这个语法警告。

#include <stdio.h>
int main(void)
{
    int a;
    printf("\n Enter: ");
    scanf("%d", &a);
    return (0);
}
total: 0 errors, 1 warnings, 8 lines checked
c:2: warning: no description found for function main
c compiler-warnings
1个回答
6
投票

包含库后,您应该包含程序的描述,如下所示:

#include <stdio.h>

/**
 * main - Entry point
 * 
 * Description: 'the program's description'
 * @parameter: describe the parameter
 * 
 * Return: Always 0 (Success)
 */

int main(void)
{
    Code goes here
}
© www.soinside.com 2019 - 2024. All rights reserved.