最真实的电脑开车游戏:我的程序有好多错误谁能帮我找一下啊!!!!!!!

来源:百度文库 编辑:神马品牌网 时间:2024/05/06 02:31:56
#include<malloc.h>
#include<stdio.h>
#include<string.h>
# define LEN sizeof(struct student)
# define NULL 0
# define CH "%s,%f,%c,%ld,0",&(p1->name),&p1->num,&(p1->res),&p1->six,next
struct student
{
char name[20];
long num;
float res;
char six;
struct student*next;
};

struct student* build()
{
printf("please input informations");
struct student*head,p1,p2;
head=p1=p2=(struct student*)malloc(LEN);
scanf(CH);
next=NULL;
return(head);
}

struct student* input(struct student*head)
{
struct student*p1,p2,p3;
p1=p2=haed;
p1=(struct student*)malloc(LEN);
printf("please input informastion");
scanf(CH);
if(p1->num<head->num)
{
p1->next=head;
head=p1;
}
else
if(p1->num>head->num&&head->!NULL)
{
for(p3=p2=head;p2->next!=NULL;p3++)
{
p2++;
if(p1->num==p2.num)
printf("error,this student has have exit.");
else if(p1->num<p2.num)
{
p3.next=p1;
p1.next->p2;
break;
}
else
{
p2++;
p3++;
}
}
}
else if(p1->num==head.num)
printf("error,this student has have exit.");
else head->next=p1;
return(head);
}

struct student *print(struct student *head)
{
long num;
struct student *p1;
printf("who do you want?");
scanf("%ld",num);
if(num<head.num)
printf("error not exit");
else
for(p1=head;p1->!NULL;p1++)
{
if(p1->num==num)
{
printf(CH);
break;
}
else(p1->!=num&&p1->next==NULL)
printf("error not exit");
}
return(head)
}
struct student *print(struct student *head)
{
long num;
struct student *p1;
printf("who do you want?");
scanf("%ld",num);
if(num<head.num)
printf("error not exit");
else
for(p1=head;p1->!NULL;p1++)
{
if(p1->num==num)
{
printf(CH);
break;
}
else(p1->!=num&&p1->next==NULL)
printf("error not exit");
}
return(head)
}

4月23日 13:28 不碍事,可能是由于你安装的破解后的卡巴,导致程序出错。
它再提示你关闭的时候,你重新运行一遍就行了。
开始--》程序--》找到卡巴,运行那个“K”的图标志。