我该如何解决这个错误?警告:函数'main_menu'的隐式声明

use*_*098 2 c linked-list

这是一个使用链接列表的b日提醒代码

typedef struct node  
{  
    char name[61];  
    int month;          int day;  
    int year;  
    struct node *next;  
}node;  
Run Code Online (Sandbox Code Playgroud)

这是清单

typedef struct list  
{  
    node *head;  
    node *tail;  
}list;  
Run Code Online (Sandbox Code Playgroud)

这是创建列表代码

list *create_list(list *plist)  
{  
    plist->head = NULL;  
    plist->tail = NULL;  
    return plist;  
}  
Run Code Online (Sandbox Code Playgroud)

这会将创建的节点插入列表中

list *insert_list(list *plist, node *pnode, node *new_node)  
{  
    new_node->next = pnode->next;  
    pnode->next = new_node;  
    if (plist->tail == pnode)  
    {  
            plist->tail = new_node;  
    }  
}  
Run Code Online (Sandbox Code Playgroud)

这是添加生日菜单

void add_birthday(list *List)  
{  
    char x;  
    node *data = (node *) malloc(sizeof(node));  
    List = (list*) malloc(sizeof(list));  
    printf("******************************************************************\n");  
    printf("                    ADD BIRTHDAY REMINDER FORM\n");  
    printf("******************************************************************\n");  
    List = insert_list(List, data, create_node(data));  
    printf("Would you like to add another(y/n)?\n");  
    scanf("%c", &x);  
    if (x=='y')  
    {  
            while (x=='y')  
            {  
                    if (x=='y')  
                    {  
                            getchar();  
                            printf("******************************************************************\n");  
                            node *data = (node *) malloc(sizeof(node));  
                            List = insert_list(List, data, create_node(data));  
                            printf("Would you like to add another(y/n)?\n");  
                            scanf("%c", &x);  
                    }  
            }  
    }
    main_menu(List);  //the problem lies here
}  
Run Code Online (Sandbox Code Playgroud)

这是主菜单

void main_menu(list* List)  
{  
    int x;  
    printf("Welcome to myCalendar version 1.0.0\n");  
    printf("Please input the number that you wish to do:\n");  
    printf("[1] Add Birthday Reminder\n");  
    printf("[2] Delete Birthday Reminder\n");  
    printf("[3] View Calendar\n");  
    printf("[4] Quit\n");  
    scanf("%d", &x);  
    getchar();  
    switch (x)  
    {  
            case 1:  
                    add_birthday(List);  
                    break;  
            case 2:  
                    delete_reminder(List);  
                    break;  
            case 3:  
                    view_calendar(List);  
                    break;  
            case 4:  
                    free(List);  
                    break;  
        }  
}
Run Code Online (Sandbox Code Playgroud)

这是主要的

int main(void)  
{  
    list* List = (list*) malloc(sizeof(list));  
    List = create_list(List);  
    main_menu(List);  
    return 0;  
}  
Run Code Online (Sandbox Code Playgroud)

Par*_*rag 5

main_menu()后定义了add_birthday()吗?如果是,则定义main_menu()之前add_birthday().还要先定义所有方法,main()或者至少在之前声明它们main().