请高手帮忙,程序错哪里了?用GCC编译器
#include <stdio.h>#include <string.h>
#define N 2
void input_e(num,name)
int num[];
char name[N][8];
{
int i;
for(i=0;i<N;i++)
{
printf("\n输入职工号: ");
scanf("%d", &num[i]);
printf("\n 输入职工名: ");
getchar();
gets(name[i]);
}
}
main()
{
int num[N];
char name[N][8];
input_e(num,name);
}
4: error: variable or field `input_e' declared void
4: error: `num' was not declared in this scope
4: error: `name' was not declared in this scope
5: error: initializer expression list treated as compound expression
5: error: expected `,' or `;' before "int"
7: error: expected unqualified-id before '{' token
7: error: expected `,' or `;' before '{' token
In function `int main()':
24: error: `input_e' cannot be used as a function