Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > how to make link betwenn flaoting point to printf statement?

Reply
Thread Tools

how to make link betwenn flaoting point to printf statement?

 
 
venkatesh
Guest
Posts: n/a
 
      12-13-2005
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

 
Reply With Quote
 
 
 
 
usr.root@gmail.com
Guest
Posts: n/a
 
      12-13-2005

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.

 
Reply With Quote
 
 
 
 
venkatesh
Guest
Posts: n/a
 
      12-13-2005
my code is
struct add
{
float x;
}y;
main()
{
scanf("%f",&y.x);
-------
}
then it will shows error "floating point not linked"
please help

 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      12-13-2005
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.

 
Reply With Quote
 
Anand
Guest
Posts: n/a
 
      12-13-2005
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
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      12-13-2005
"venkatesh" <(E-Mail Removed)> 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) http://www.velocityreviews.com/forums/(E-Mail Removed) <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.
 
Reply With Quote
 
venkatesh
Guest
Posts: n/a
 
      12-14-2005
please tell how to make exiplicit includetion for flaoting point

 
Reply With Quote
 
Jordan Abel
Guest
Posts: n/a
 
      12-14-2005
On 2005-12-14, venkatesh <(E-Mail Removed)> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Share-Point-2010 ,Share-Point -2010 Training , Share-point-2010Hyderabad , Share-point-2010 Institute Saraswati lakki ASP .Net 0 01-06-2012 06:39 AM
Scenario 5: IS-IS routing on Frame Relay Multi-point and Point-to-Point David Sudjiman Cisco 0 06-08-2006 09:11 AM
(void) printf vs printf whatluo C Programming 29 09-08-2005 05:42 PM
bus error with printf line included, error without printf line? ben C Programming 4 06-26-2004 04:42 PM



Advertisments