Floatin point issues

S

sandeep

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.name,&e.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.
 
S

Suman

sandeep said:
What error do you get in this?
compile error, of course!
#include said:
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.name,&e.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.
 
S

sandeep

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
 
M

Martin Ambuhl

sandeep said:
I got the error as : Floating point formats not linked, why?
And how to rectify this problem?


Learn to check the FAQ before posting. In particular,
<http://www.eskimo.com/~scs/C-faq/q14.13.html>:
Question 14.13

I'm having trouble with a Turbo C program which crashes and says
something like ``floating point formats not linked.''

Some compilers for small machines, including Borland's (and Ritchie's
original PDP-11 compiler), leave out certain floating point support if
it looks like it will not be needed. In particular, the
non-floating-point versions of printf and scanf save space by not
including code to handle %e, %f, and %g. It happens that Borland's
heuristics for determining whether the program uses floating point are
insufficient, and the programmer must sometimes insert an extra,
explicit call to a floating-point library routine to force loading of
floating-point support. (See the comp.os.msdos.programmer FAQ list for
more information.)
And can anybody tell me some more basics about floating point
issues.

There are several good sites on the web, but you could consider the C
FAQ section on floating point,
<http://www.eskimo.com/~scs/C-faq/s14.html>, "14. Floating Point".
 
C

CBFalconer

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

He told you where to get it. Who is this fellow u? I remember U
Thant, but I don't think he had any great influence over the C
language. If you want to be taken seriously quote an adequate
portion of what you are replying to, snipping away the remainder,
and not topposting. Also sedulously eschew infantile
abbreviations.
 
S

sandeep

I think you are a good watchman.
Keep doing this , ithink look for a job of watchman.
 
S

Suman

sandeep said:
I think you are a good watchman
Look for a job of watchman.
Don't be a spoilsport!

This is not how you reply to others over a newsgroup.You may have
opinions
that differ, but this is not the way to show it.Every one out here
is(or atleast
tries) to help others..I am not sure how many have already
done it, but few must have, by this time kill(fil)ed you!Get some basic
netiquette training.

You will of course see posts(past, present & future) by respected
regulars that
delve in expletives, but most of the time they fit the context.Not
yours.This is
streetfight.

And don't you reply to me asking me why I am supporting them - I have
my own
reasons, that (your) reasons cannot comprehend.
 
C

CBFalconer

sandeep said:
I think you are a good watchman
Look for a job of watchman.

I am feeling irritable, and have seen this user ignore instructions
on correct use of google, quoting, etc. for long enough. Now he is
also becoming a smart alec. Well, not around here. PLONK.
Goodbye, cruel world.
 
N

Neil Kurzman

sandeep said:
I think you are a good watchman
Look for a job of watchman.

I think You Need a Clue. Go find one.

Since your English is terrible, You should Avoid anything that might
might make you misunderstood.
In your case try all SMS and get all the help you deserve.

In "English"

I think you are a good watchman.
You should look for a job as watchman.

U R N AH.
 
A

Athanasios Papaioannou

S

sandeep

Thank you for your reply.
Athanasios said:
Sandeep said:
Main should return int and have void as parameter(or argc,argv).
{
struct emp
{
char name[20];
float sal;
);
^^^
Probably you mean }.
I got the error as : Floating point formats not linked, why?
There is no problem when i compile it in gcc. In google I found that
there is such a problem when you use Borland compilers.
Yes i use borland's compiler.
See
 
S

sandeep

Thank you for your reply.
Athanasios said:
Sandeep said:
Main should return int and have void as parameter(or argc,argv).
{
struct emp
{
char name[20];
float sal;
);
^^^
Probably you mean }.
I got the error as : Floating point formats not linked, why?
There is no problem when i compile it in gcc. In google I found that
there is such a problem when you use Borland compilers.
Yes i use borland's compiler.That is why it happened.
See
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top