Floatin点问题 [英] Floatin point issues

查看:52
本文介绍了Floatin点问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你有什么错误吗?

main()

{

struct emp

{

char name [20];

float sal;

);

struct emp e [10];

int i;

for(i = 0; i< = 9; i ++)

scanf("%s%f", e [i] .name,& e [i] .sal);

}

我得到的错误为:浮点格式没有链接,为什么?

以及如何解决这个问题?

并且有人可以告诉我一些关于浮点的基础知识

问题。

解决方案

" sandeep" < SA ************ @ gmail.com>写道:

我得到的错误为:浮点格式没有链接,为什么?


因为你还没看过常见问题。

以及如何解决这个问题?




阅读常见问题解答。


< http://www.eskimo.com/~scs/C-faq/q14.13.html>。


HTH;手。


Richard


sandeep写道:

你在这里遇到什么错误?
编译错误,当然!

#include< stdio.h>

int main()
{
struct emp
{
char name [20];
float sal;
/ *);
这甚至不应该编译。

改为)} * /

} struct emp e [10];
int i;
for(i = 0; i <= 9; i ++)
scanf("%s%f",e [i] .name,& e [i] .sal);
返回0; }
现在这在我的机器上编译得很好。我得到的错误是:浮点格式没有链接,为什么?
以及如何纠正这个问题?
任何人都可以告诉我一些关于浮点问题的基础知识。



需要更具体。也可以阅读IEEE规格。

HTH

Suman。


谢谢,但可以如果你有或告诉我链接,请发给我任何拉链版的完整常见问题

问答。

谢谢


What error do you get in this?
main()
{
struct emp
{
char name[20];
float sal;
);
struct emp e[10];
int i;
for(i=0;i<=9;i++)
scanf("%s%f",e[i].name,&e[i].sal);
}
I got the error as : Floating point formats not linked, why?
And how to rectify this problem?
And can anybody tell me some more basics about floating point
issues.

解决方案

"sandeep" <sa************@gmail.com> wrote:

I got the error as : Floating point formats not linked, why?
Because you haven''t read the FAQ.
And how to rectify this problem?



Read the FAQ.

<http://www.eskimo.com/~scs/C-faq/q14.13.html>.

HTH; HAND.

Richard


sandeep wrote:

What error do you get in this? compile error, of course!
#include <stdio.h>
int main()
{
struct emp
{
char name[20];
float sal;
/* ); This should not even compile.
Changed ) to }*/
} struct emp e[10];
int i;
for(i=0;i<=9;i++)
scanf("%s%f",e[i].name,&e[i].sal); return 0; } Now this compiles fine on my machine. I got the error as : Floating point formats not linked, why?
And how to rectify this problem?
And can anybody tell me some more basics about floating point
issues.


Need to be more specific. Can also read up on IEEE specs.
HTH
Suman.


Thanks , but could u please send me any zip version of full FAQ
question and answers if u have or tell me the link.
thanks


这篇关于Floatin点问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆