帮我看一个程序吧?错在哪里了? typedef struct jcb {char name[4]; int length; int printer; int tape; int runtime; int waittime; struct jcb *next; }JCB; JCB *head; int tape,printer; long memory; shedule() {float xk,k; JCB *p,*q,*s,*t; while(q!=null) /*line 16*/ {p=head; q=s=null; k=0; while(p!=null) {if(p->length<=memory&&p->tape<=tape&&p->printer<=printer) {xk=(float)(p->waittime)/p->runtime; if(q==null||xk>k) {k=xk; q=p; t=s; }/*if*/ }/*if*/ s=p; p=p->next; }/*while*/ if(q!=null) {if(t==null) head=head->next; else t->next=q->next; memory=memory-q->length; tape=tape-q->tape; printer=printer-q->printer; printf("选中的作业名:%s\n",q->name); } }
main() {char name[4]; /*line 45*/ int i,size,tcount,pcount,wtime,rtime; JCB *p; memory=65536; tape=4; printer=2; head=null; printf("输入作业相关数据(以作业大小为负数停止输入):\n"); printf("输入作业名,作业大小,磁带机数,打印机数,等待时间,估计执行时间\n"); scanf("%s%d%d%d%d%d",&name,&size,&tcount;&pcount;&wtime,&rtime); while(size!=-1) { p=(JCB*)malloc(sizeof(JCB)); strcpy(p->name,name); p->length=size; p->printer=pcount; p->tape=tcount; p->runtime=rtime; p->waittime=wtime; p->next=head; head=p; printf("输入作业名,作业大小,磁带机数,打印机数,等待时间,估计执行时间\n"); scanf("%s%d%d%d%d%d",&name,&size,&tcount;&pcount;&wtime,&rtime); } shedule(); } }
出现下面这两个提示错误 error d:\tc\222g.C 16:Undefined symbol 'null' in function shedule error d:\tc\222g.C 45:Statement missing ; function shedule 怎么改正啊?我怎么改都不行