关于链表以及函数返回值的问题
本人新手,最近在学习链表的构建,自己打了如下的程序。但是在编译过程中报错,现实的错误报告如下:
linkedlist.c: 在函数‘main’中:
linkedlist.c:128:10: 警告:赋值时将整数赋给指针,未作类型转换 [默认启用]
head = delete_node(head, b);
^
/tmp/ccC1e3lL.o:在函数‘main’中:
linkedlist.c:(.text+0x351):对‘delete_node’未定义的引用
collect2: 错误:ld 返回 1
但检查之后没有发现有数据类型方面的错误,不知是哪里出现了错误,希望各位大神不吝赐教,谢谢
#include
#include
#define ERROR1The list isn''t exsist!
struct node{
int value;
struct node *next;
};
/*Create a new list*/
struct node *create()
{
struct node *q, *p, *head;
int a;
head= q= NULL;
while(1)
{
printf("Please select mode:\n");
scanf("%d", &a);