关于格雷码的c语言实现 error C2071: 'main' : illegal storage class
#include <stdio.h>#include<malloc.h>
#define len sizeof(struct Dulnode)
#define null 0;
typedef struct Dulnode{
int e;
struct Dulnode *next;
struct Dulnode *front;
}
main()
{ int i;
struct Dulnode e;
struct Dulnode *p;
struct Dulnode *p1,*p2;
p=(struct Dulnode*)malloc(len);
p->next=null;
p->front=null;
p1=p;
p2=p;
scanf("%d",&p->e);
for(i=0;i<10;i++){
while(e==0||e==1)
{
p1=(struct Dulnode *)malloc(len);
scanf("%d",&p1->e);
p1->next=null;p2->next=p1;
p1->front=p2;
};
p2=p2->next;
p=p->next;
};
while(p!=null){
if(p->e==p->front->e)
p->e=0;
else p->e=1;
p=p->front;};
for(;p!=null;p=p->next)
printf("%d",p->e);
error C2071: 'main' : illegal storage class