鱼C论坛

 找回密码
 立即注册
查看: 4528|回复: 2

哪里错了??

[复制链接]
发表于 2013-9-21 17:22:54 | 显示全部楼层 |阅读模式
1鱼币
#include <stdio.h>
struct st
{  int num;
char *name;
float mark;
struct st *next;
};
int main()
{   struct st *head;
struct st one,two,three;
head = &one;

one.num = 123;
one.name = "jack";
one.mark = 85.0;
one.next = &two;

two.num = 1234;
two.name = "lll";
two.mark = 52.0;
two.next = &three;

three.num = 56513;
three.name= "olive";
three.mark = "102.0";
three.next = NULL;

while( head != NULL)
{  printf("num = %d\n name = %s\n mark = %f\n",head->num,head->name,head->mark);
head = head->next;

}
  return 0;
}

最佳答案

查看完整内容

three.mark = "102.0"; 多了个“” 赋值
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2013-9-21 17:22:55 | 显示全部楼层
        three.mark = "102.0";

多了个“”
赋值
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2013-9-21 17:49:11 | 显示全部楼层
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-11-6 15:31

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表