By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,413 Members | 1,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,413 IT Pros & Developers. It's quick & easy.

how to make link betwenn flaoting point to printf statement?

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a

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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
"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

P: n/a
please tell how to make exiplicit includetion for flaoting point

Dec 14 '05 #7

P: n/a
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.