C语言小程序 error C2143: 语法错误 : 缺少 ) (在 & 的前面)

#include<stdio.h>
typedef struct
{
int elem[20];
int length;
}seqlist;
void init_seqlist(seqlist &L);
void main()
{
seqlist L;
int i,t;
i=0;
t=0;
init_seqlist(L);
for(i=0;i<20;i++)
{
printf("请输入第%d个数\n",i++);
scanf("%d",&t);
L.elem[i]=t;
}
}
void init_seqlist(seqlist &L)
{
L.length=0;
}

为什么缺少)????

D:\装机软件\VC++6.0\Microsoft Visual Studio\MyProjects\try\Text1.c(7) : error C2143: syntax error : missing ')' before '&'
D:\装机软件\VC++6.0\Microsoft Visual Studio\MyProjects\try\Text1.c(7) : error C2143: syntax error : missing '{' before '&'
D:\装机软件\VC++6.0\Microsoft Visual Studio\MyProjects\try\Text1.c(7) : error C2059: syntax error : '&'
D:\装机软件\VC++6.0\Microsoft Visual Studio\MyProjects\try\Text1.c(7) : error C2059: syntax error : ')'
D:\装机软件\VC++6.0\Microsoft Visual Studio\MyProjects\try\Text1.c(14) : warning C4013: 'init_seqlist' undefined; assuming extern returning int
D:\装机软件\VC++6.0\Microsoft Visual Studio\MyProjects\try\Text1.c(22) : error C2143: syntax error : missing ')' before '&'
D:\装机软件\VC++6.0\Microsoft Visual Studio\MyProjects\try\Text1.c(22) : error C2143: syntax error : missing '{' before '&'
D:\装机软件\VC++6.0\Microsoft Visual Studio\MyProjects\try\Text1.c(22) : error C2059: syntax error : '&'
D:\装机软件\VC++6.0\Microsoft Visual Studio\MyProjects\try\Text1.c(22) : error C2059: syntax error : ')'
执行 cl.exe 时出错.

Text1.obj - 1 error(s), 0 warning(s)

第1个回答  2014-04-07
你这是C语言,并不是C++,

VC6应该不支持 &引用吧???本回答被提问者采纳