从文件读取数据创建链表不成功

#include "stdio.h"
#include "stdlib.h"
typedef struct A
{ int a; struct A*next;}B;
typedef struct C
{ int b; }c[3];
B*creat(int n,int c[3])
{ for(int i=0;i { printf("%d\n",c[i]); }
B*head,*node,*end;
head=(B*)malloc(sizeof(B));
head=end;
for(int i=0;i {
node=(B*)malloc(sizeof(B)); node->a=c[i];

end->next=node;

end=node; }

end->next=NULL;
return head;}
void display(B*head)
{ B*t=head;

while(t->next!=NULL)

{

printf("%d\n",t->next);

t=t->next; }}
int main()
{ C c[3]; c[0].b=2;

c[1].b=4; c[2].b=6;

int ID[3],select;
FILE*w=fopen("test.txt","w");
if(w==NULL)
{ printf("无效的文件");

return 0; }
for(int n=0;n<3;n++)
{fprintf(w,"%d ",c[n].b); }
fclose(w);
FILE*p=fopen("test.txt","r");
if(p==NULL){ printf("无效的文件"); return 0; }

for(int n=0;n<3;n++)
{ fscanf(p,"%d ",&ID[n]); printf("%d\n",ID[n]);}
fclose(p);

B*b=creat(3,ID);

display(b);

return 0;

}

文件呢,文件的内容是什么
程序的报错信息是什么
{ for(int i=0;i { printf("%d\n",c[i]); }
for(int i=0;i {
这些地方代码都没有贴完整