| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
共有 731 人关注过本帖
标题:[求助]结构体赋值
取消只看楼主 加入收藏
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);
}
2006-01-08 17:34
快速回复:[求助]结构体赋值
数据加载中...
 
   



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

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