标题:[求助]结构体赋值
取消只看楼主
tseug1979
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2005-6-15
 问题点数:0 回复次数:0 
[求助]结构体赋值

请问为什么不能对以下结构体变量中的实型变量赋值,多谢
struct student
{
int num;
char name[8];
float score;
struct student * next;
}stud;
main()
{
struct student *p;
p=&stud;
printf("input the recorder:(num name score)\n");
scanf("%d%s%f",&p->num,p->name,&p->score);
printf("num=%d %s score=%g\n",p->num,p->name,p->score);
}
搜索更多相关主题的帖子: 赋值 结构体 score num name 
2006-01-08 17:34



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-42046-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020727 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved