麻烦各位c语言编程大神帮我看一下为什么编译时没有错误而执行时会出现这样的错误???
[[color=#FF0000]color=#FF0000]--------------------Configuration: 发 - Win32 Debug--------------------Linking...
9-1.obj : error LNK2001: unresolved external symbol _stecpy
9-1.obj : error LNK2001: unresolved external symbol _chaozhao
Debug/发.exe : fatal error LNK1120: 2 unresolved externals
执行 link.exe 时出错.
发.exe - 1 error(s), 0 warning(s)
源程序如下:
#include<stdio.h>
#include<string.h>
#define N 10
char name[N][10];
float bianhao[10],score[10],dafen[10];
void init()
{int i,j;
float score[11]={0},min=100,max=0,sum=0;
for(i=0;i<10;i++)
{
printf("请输入选手的编号(1-10):");
scanf("%d",&bianhao[i]);
printf("请输入选手的姓名:");
scanf("%s",name[i]);
printf("请输入评委的打分(0-10):");
scanf("%d",&dafen[i]);
for(j=0;j<10;j++)
{
scanf("%f",&score[j]);
sum=sum+score[j];
if(max<score[j])
{max=score[j];}
if(min>score[j])
{min=score[j];}
}
if(j==9)
score[i]=(sum-max-min)/8;
}
}
void paixu()
{int i,j;
char name[N][10],stemp[10];
float score[10],temp;
for (i=0;i<N-1;i++)
for (j=i+1;j<N;j++)
if(score[i]<score[j])
{ temp=score[i];
score[i]=score[j];
score[j]=temp;
strcpy(stemp,name[i]);
strcpy(name[i],name[j]);
stecpy(name[j],stemp);
}
printf("10位选手的分数从高到低的排序为:\n");
for (i=0;i<N;i++)
printf("%10s%f",name[i],score[i]);
}
void chaozhou()
{char score[10];
int i,xz;
printf("请输入选手的编号或名字:(B/X)");
scanf("%d",&xz);
switch(xz)
{ case 'B':
printf("该选手的成绩为%d,排名为%d",score[i],i+1);
case 'X':
printf("该选手的成绩为%d,排名为%d",score[i],i+1);
}
}
int main()
{int n;
printf("1输入选手信息\n2排序输出名次\n3查找\n");
while (1)
{printf("选择");
scanf("%d",&n);
switch (n)
{case 1:
init();
break;
case 2:
paixu();
case 3 :
chaozhao();
}
}
}