光栅使用什么灯光:帮忙改一下C程序

来源:百度文库 编辑:高考问答 时间:2024/05/01 10:44:20
链表的翻转,有几个错误,不会改了,帮一下忙,谢啦!
#define null 0
#define len sizeof(struct stu)
typedef struct node
{int data;
struct node *next;
}node,*linklist;
linklist creatfromtail()
{
linklist l;
struct node *s,*r;
int c;
int flag=1;
printf("input number(0:list end):");
l=(node*)malloc(sizeof(node));
l->next=null;
while(flag)
{ scanf("%d",&c);
if(c!='$')
{
s=(node*)malloc(sizeof(node));
s->data=c;
r->next=s;
r=s;
}
else
{
flag=0;
r->next=null;
}
}
return l;
}
void contray-cirl(linklist &l)
{
node *t,*p,*q;
t=l;
p=t->next;
q=p->next;
while(p!=l)
{p->next=t;
t=p;
p=q;
q=p->next;
}
l->next=t;
}
void main()
{int m=0;
while(s->num!=0)
{m=contray_cirl;
printf("\n the new list:\n",m);
}
}

需要包含头文件:#include "dos.h"