|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
#include "stdio.h"
#include "stdlib.h"
#include "time.h"
#include "string.h"
#define N 50
#define M 6
void f(int one[N][M+1]);
void g(int one[N][M+1],char name[N][7]);
void k(char name[N][7]);
void Modi(int one[N][M+1],char name[N][7]);
void Calu(int one[N][M+1],char name[N][7]);
void Query(int one[N][M+1],char name[N][7]);
void Sort(int one[N][M+1],char name[N][7]);
void main()
{
int one[N][M+1]={0};
char name[N][M+1]={0};
f(one);
k(name);
g(one,name);
int select=2;
int flag=1;
//显示菜单
while(flag)
{
printf("\t1----输入成绩\n");
printf("\t2----输出成绩\n");
printf("\t3----修改成绩\n");
printf("\t4----计算\n");
printf("\t5----查寻\n");
printf("\t6----排名\n");
printf("\t0----退出\n");
printf("\t\t请选择(0-6):");
scanf("%d",&select);
switch (select)
{
case 0:flag=0;break;
case 1:f(one);k(name);break;
case 2:g(one,name);break;
case 3:Modi(one,name);break;
case 4:Calu(one,name);break;
case 5:Query(one,name);break;
case 6:Sort(one,name);break;
default:printf("输入错误,请重新输入一个数\n");getchar();
}
}
}
//修改成绩
void Moid(int one[N][M+1],char name[N][M+1])
{
printf("修改成绩");getchar();
}
//计算
void Calu(int one[N][M+1],char name[N][M+1])
{
printf("计算");getchar();
}
//查询
void Query(int one[N][M+1],char name[N][M+1])
{
printf("查询");getchar();
}
//排名
void Sort(int one[N][M+1],char name[N][M+1])
{
printf("排名");getchar();
}
//随机取分数
void f(int one[N][M+1])
{
srand((unsigned)time(0));
for(int i=0;i<N;i++)
for(int j=0;j<M;j++)
{
one[i][j]=rand()%59+42;
one[i][M]+=one[i][j];
}
}
//插入姓名
void k(char name[N][M+1])
{
char xing[8][3]={"张","赵","秦","齐","楚","燕","魏","韩"};
srand((unsigned)time(0));
for (int i=0;i<N;i++)
{
int num=rand()%12;
if (num>=8) num=2;
strcpy(name[i],xing[num]);
for (int j=2;j<6;j++)
name[i][j]=-30-rand()%40;
}
}
//输出座号、姓名各科分数及总分
void g(int one[N][M+1],char name[N][M+1])
{
for(int i=0;i<N;i++)
{
printf("%2d%9s",i+1,name[i]);
for(int j=0;j<=6;j++)
printf("%7d",one[i][j]);
printf("\n");
}
}
错误提示:error LNK2001: unresolved external symbol "void __cdecl Modi(int (* const)[7],char (* const)[7])" (?Modi@@YAXQAY06HQAY06D@Z)
求解!!编译没问题,然后就这样了,求大神指点!!
你声明了 Modi 函数,但是没有定义
53行有一个名为 Moid 的函数,名字和 Modi 极其相似,是打错单词?
ps:没有认真看程序
|
|