| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1766 人关注过本帖
标题:c的链表问题请教高手
只看楼主 加入收藏
cosdos
Rank: 9Rank: 9Rank: 9
来 自:ShangHai
等 级:蜘蛛侠
威 望:6
帖 子:2109
专家分:1385
注 册:2007-6-19
收藏
得分:0 
《C Primer Plus(第五版)中文版》

数据结构的例题发现有几个变量名有错(翻译时翻错的)

—>〉Sun〈<—
2008-04-20 15:23
sunkaidong
Rank: 4
来 自:南京师范大学
等 级:贵宾
威 望:12
帖 子:4496
专家分:141
注 册:2006-12-28
收藏
得分:0 
C Run-Time Error R6002
floating-point support not loaded

The program needs the floating-point library, but the library was not linked to the program.

One of the following may have occurred:

The program was compiled or linked with an option (such as /FPi87) that required a coprocessor, but the program was run on a machine that did not have a coprocessor installed.


A format string for a printf or scanf function contained a floating-point format specification, and the program did not contain any floating-point values or variables.


The compiler minimizes a program's size by loading floating-point support only when necessary. The compiler cannot detect floating-point format specifications in format strings, so it does not load the necessary floating-point routines.


Use a floating-point argument to correspond to the floating-point format specification, or perform a floating-point assignment elsewhere in the program. This causes floating-point support to be loaded.


In a mixed-language program, a C library was specified before a FORTRAN library when the program was linked. Relink and specify the C library last.

学习需要安静。。海盗要重新来过。。
2008-04-20 15:25
编程游侠
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-4-13
收藏
得分:0 
#include "stdio.h"
#include "malloc.h"
#define NULL 0
#define LEN sizeof(struct student)

struct student
{   int num;
    float score;
    struct student *next;
};

int n;

struct student *creat()         //把creat()中的void去掉,如左
{   struct student *head,*p1,*p2;
    n=0;
    p1=p2=(struct student *)malloc(LEN);
    printf("input p1.num,p1.score");
    scanf("%d,%f",&p1->num,&p1->score);
    head=NULL;
    while(p1->num!=0)
    {n=n+1;
     if(n==1)head=p1;
     else p2->next=p1;
     p2=p1;
     p1=(struct student *)malloc(LEN);
     scanf("%d,%f",&p1->num,&p1->score);
    }
    p2->next=NULL;
    return(head);
}
   


   
   
   
   
   
main()                        //把main()函数体改为如左所示
{struct strdent *head;
  head=creat();
   
   
}
2008-04-20 19:42
now
Rank: 1
来 自:广州
等 级:新手上路
帖 子:544
专家分:0
注 册:2007-11-9
收藏
得分:0 
《C Primer Plus(第五版)中文版》
这里有电子版:
http://www.
也可以到较大型书店买,只是比较金一点,定价60元。

GIS
Geographic Information System
你在哪里?——》你的坐标?
2008-04-20 22:05
无悔
Rank: 1
等 级:新手上路
帖 子:16
专家分:0
注 册:2008-4-15
收藏
得分:0 
怎么还没高手解释啊,是老谭的书,只介绍了怎么创建函数,没把函数运用到main中,所以不会,我的哪错了,我不要程序,只是想知道我的哪错了
2008-04-21 12:31
蔡菜菜
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2008-4-1
收藏
得分:0 
scanf("%d,%f",&p1->num,&p1->score);出错
我看了一下,是&p1->score有问题,原因我也不太清楚,我的办法是前面定义float f;
再scanf("%d,%f",&p1->num,&f);
p1->score=f;
2008-04-21 19:14
快速回复:c的链表问题请教高手
数据加载中...
 
   



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

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