请问这个程序到底错在哪里了,为什么运行不成功???求指点,哪位高手能帮
/* 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");
} |
免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。
版权声明:作者保留权利,不代表天盟立场。
|
|
|
|
void fprint(struct student stud)开头要声明
void fprint(struct student stud);这句话放到main函数的外面就行了 |
|
|
|
|
void fprint(struct student stud);这句话放到main函数的外面就行了 |
|
|
|
|
void fprint(struct student stud)开头要声明 |
|
|
|
|