一个查询函数问题,不能运行啊
#include<stdio.h>#include<string.h>
#include<conio.h>
#include<stdlib.h>
#define NULL 0
void menue();
void create();
void add();
void del();
void rank();
void find();
void out();
typedef struct link
{
char no[9];
char name[20];
int score[5];
float ave;
struct link *next;
}stu;
stu *head=NULL;
void find()
{
int ii,ij,ib=0;
char b[20];
stu *p;
p=head;
printf("no. or name\n");
scanf("%s",b);
while(p!=NULL)
{
while(strcmp(b,p->no)==0||strcmp(b,p->name)==0)
{
printf("%-10s%-20s%-8s%-8s%-8s%-8s%-8s\n","no.","name","chinese","math","english","average","tatal");
printf("%-10s%-20s%-8d%-8d%-8d%-8.2f%-8d",p->no,p->name,p->score[0],p->score[1],p->score[2],p->ave,p->score[4]);
ib=1;
break;
}
p=p->next;
}
if(ib==0)
printf("sorry!\n");
clrscr();
getch();
menue();
}
这只是一部分,就这个不能运行,大师你就帮小弟费眼看看吧,帮帮小弟。。