求谁来帮忙看看
#include <stdio.h>struct student
{
int num;
char *name;
float score;
};
void str(struct student *pstr);
void main()
{
struct student stu,*pstu;
stu.num= 12;
stu.name = "Jane";
stu.score = 99.5;
stu.score = 99.0;
stu.score = 98.5;
pstu = &stu;
str(&stu);
}
void str(struct student *pstr)
{
printf("Num:%d\n",pstr->num);
printf("Name:%s\n",pstr->name);
printf("score_1:%0.2f\n",pstr->score);
printf("score_2:%0.2f\n",pstr->score);
printf("score_3:%0.2f\n",pstr->score);
}
编译没问题,运行后
这个该怎么解决。新手,不懂 新人,求高手帮忙看看 float score;
改为
float score;
你下面存进了3个float数。。 zheyitian 发表于 2014-3-8 13:12 static/image/common/back.gif
float score;
改为
float score;
谢谢啊,没看出来
页:
[1]