在线
客服

发布
需求

天盟
APP

天盟APP下载

关注
微信

微信扫一扫访问
顶部

请问这个程序到底错在哪里了,为什么运行不成功???求指点,哪位高手能帮

/* Note:Your choice is C IDE */
#include "stdio.h"
#define FORMAT "%d\n%s\n%f\n%f\n%f\n"
struct student
{
int num;
char name;
float score[3];
};
void main()
{
    void fprint(struct student);
    struct student stud;
    stud.num=1010;
    strcpy(stud.name,"Li yang");
    stud.score[0]=71.5;
    stud.score[1]=90;
    stud.score[2]=81.5;
    fprint(stud);
}
void fprint(struct student stud)
{
printf("FORMAT,stud.num,stud.name,stud.score[0],stud.score[1],stud.score[2]");
printf("\n");
}

免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。

版权声明:作者保留权利,不代表天盟立场。

使用道具 举报

全部参与3

void fprint(struct student stud)开头要声明
void fprint(struct student stud);这句话放到main函数的外面就行了

使用道具 举报

void fprint(struct student stud);这句话放到main函数的外面就行了

使用道具 举报

void fprint(struct student stud)开头要声明

使用道具 举报

发新帖
国内首家创新型IT技术需求众包服务平台,软件需求就上天盟网! 立即登录 立即注册