472,142 Members | 1,335 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,142 software developers and data experts.

how to make link betwenn flaoting point to printf statement?

hai to everybodey,
suppose i am using float variable in
structure,when i am manupulating them it will not shows the linkage
error? but when i am using scanf to read particular variable it shows
run time error?
how to make explicitly link betwen floating point
library and to printf statement?

thanks in advance

Dec 13 '05 #1
7 1554

venkatesh wrote:
hai to everybodey,
suppose i am using float variable in
structure,when i am manupulating them it will not shows the linkage
error? but when i am using scanf to read particular variable it shows
run time error?
how to make explicitly link betwen floating point
library and to printf statement?

thanks in advance


you'd better post your code here,so we can found what wrong with that.

Dec 13 '05 #2
my code is
struct add
{
float x;
}y;
main()
{
scanf("%f",&y.x);
-------
}
then it will shows error "floating point not linked"
please help

Dec 13 '05 #3
venkatesh a écrit :
my code is
struct add
{
float x;
}y;
main()
{
scanf("%f",&y.x);
-------
}
then it will shows error "floating point not linked"
please help


This means that your compiler left
the floating point package out, and at runtime it can't do
a floating point scan.

Upu should either:
1) Instruct your compiler to link the floating point package.
2) Get a better compiler.

Dec 13 '05 #4
venkatesh wrote:
my code is
struct add
{
float x;
}y;
main()
{
scanf("%f",&y.x);
-------
}
then it will shows error "floating point not linked"
please help

See the FAQ mentioned below. It covers the exact situation.

--
(Welcome) http://www.ungerhu.com/jxh/clc.welcome.txt
(clc FAQ) http://www.eskimo.com/~scs/C-faq/top.html
Dec 13 '05 #5
"venkatesh" <pv***********@gmail.com> writes:
my code is
struct add
{
float x;
}y;
main()
{
scanf("%f",&y.x);
-------
}
then it will shows error "floating point not linked"


This is question 14.13 in the C FAQ.

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

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Dec 13 '05 #6
please tell how to make exiplicit includetion for flaoting point

Dec 14 '05 #7
On 2005-12-14, venkatesh <pv***********@gmail.com> wrote:
please tell how to make exiplicit includetion for flaoting point


for that you'll need to look up your platform documentation - the only
advice given in the faq, IIRC, is for unix platforms, which do not
require the math library for %f formats.
Dec 14 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Steven T. Hatton | last post: by
3 posts views Thread by sugaray | last post: by
5 posts views Thread by star_night | last post: by
8 posts views Thread by sudhirlko2001 | last post: by
28 posts views Thread by Steven Bethard | last post: by
1 post views Thread by xahlee | last post: by
13 posts views Thread by surlogics | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.