聂树斌被宣判无罪案:此程序在WINTC上编译成功 在VC++上却显示一个错误

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/05 10:45:38
#include "stdlib.h"
#define max_size 30
typedef struct {
int num;
int code;
}ElemType;
typedef struct{
ElemType *elem;
int length;
int listsize;
}SqList;
main()
{SqList L;
int n,i,e,t,a,m;
printf("This Joseph designed by:Computer 4;3104006615,wu sheng xing\n");
do{n=0;t=0;
L.elem=(ElemType*)malloc(max_size*sizeof(ElemType));
if(!L.elem)return;
L.length=0;
L.listsize=max_size;
printf("input the %d's num,input 0 to end:",n+1);
scanf("%d",&e);
while(e!=0)
{L.elem[n].code=e;L.elem[n].num=n+1;n++;
printf("input the %d's num,input 0 to end:",n+1);
scanf("%d",&e);}
L.length=n;
printf("input the first m:");
scanf("%d",&m);
while(n)
{t=(m+t-1)%n;
m=L.elem[t].code;printf("%d ",L.elem[t].num);
if(n>1&&t<n-1)for(i=t;i<n-1;i++)L.elem[i]=L.elem[i+1];
n--;L.length--;
}
printf("\npress 1 to countinue press 0 to end\n");
scanf("%d",&a);
}while(a);
}

求助!!

少头文件
#Include "stdio.h"

#include "stdio.h"吧