"void __cdecl print(struct student * const)" (?print@@YAXQAUstudent@@@Z)什么意思?

帮我看看这个程序哪错了#include<stdio.h>inti=0;structstudent{intnum;charname[20];doublescore1,sco... 帮我看看这个程序哪错了
#include <stdio.h>
int i=0;
struct student
{
int num;
char name[20];
double score1,score2,score3;
double all;
double ave;
}stu[50];
void input(struct student stu1[]);
void print(struct student stu2[]);
void print1(struct student stu3[]);
void main ()
{
char ch=' ';
do {
input(stu);
printf("Are you continue?(Y or N)\n");
fflush(stdin);
scanf("%c",&ch);
}
while(ch=='y'||ch=='Y');
print(stu);
print1(stu);

}
void input(struct student stu1[])
{
printf("please input the student's number.\n");
scanf("%d",&stu[i].num);
printf("please input the student's name.\n");
fflush(stdin);
scanf("%s",&stu[i].name);
printf("please input the student's score1.\n");
scanf("%f",&stu[i].score1);
printf("please input the student's score2.\n");
scanf("%f",&stu[i].score2);
printf("please input the student's score3.\n");
scanf("%f",&stu[i].score3);
stu[i].all=stu[i].score1+stu[i].score2+stu[i].score3;
stu[i].ave=stu[i].all/3;
i++;
}
void ptint(struct student stu2[])
{
int j;
for(j=0;j<=i;j++)
{
printf("number\tname\n");
printf("%d\t%s\n",stu[j].num,stu[j].name);
printf("score1\tsore2\tscore3\tallscore\tave\n");
printf("%f\t%f\t%f\t%f\t%f\n",stu[j].score1,stu[j].score2,stu[j].score3,stu[j].all,stu[j].ave);
}
}
void print1(struct student stu3[])
{
double allscore1[50],allscore2[50],allscore3[50],allscore[50];
double avescore1,avescore2,avescore3,aveallscore;
int ii;
for(ii=0;ii<i;ii++)
{
allscore1[ii]+=stu[ii].score1;
allscore2[ii]+=stu[ii].score2;
allscore3[ii]+=stu[ii].score3;
allscore[ii]+=stu[ii].all;

};
avescore1=allscore1[i]/i;
avescore2=allscore2[i]/i;
avescore3=allscore3[i]/i;
aveallscore=allscore[i]/i;

printf("allscore1\tallscore2\tallscore3\n");
printf("%f\t%f\t%f\n",allscore1[i],allscore2[i],allscore3[i]);
printf("avescore1\tavescore2\tavescore3\taveallscore\n");
printf("%f\t%f\t%f\t%f\n",avescore1,avescore2,avescore3,aveallscore);
}
展开
 我来答
isiahe
2008-03-22 · TA获得超过328个赞
知道小有建树答主
回答量:162
采纳率:0%
帮助的人:0
展开全部
这是一个链接符号错误,
程序中声明了void print(struct student stu2[]); 却没有实现。

定义一个
void print(struct student stu2[])
{
// do something here
}
就可以了。
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式