how to make link betwenn flaoting point to printf statement?

Discussion in 'C Programming' started by venkatesh, Dec 13, 2005.

  1. venkatesh

    venkatesh Guest

    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
     
    venkatesh, Dec 13, 2005
    #1
    1. Advertising

  2. venkatesh

    Guest

    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, 2005
    #2
    1. Advertising

  3. venkatesh

    venkatesh Guest

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

    jacob navia Guest

    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.
     
    jacob navia, Dec 13, 2005
    #4
  5. venkatesh

    Anand Guest

    Anand, Dec 13, 2005
    #5
  6. "venkatesh" <> 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.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
     
    Keith Thompson, Dec 13, 2005
    #6
  7. venkatesh

    venkatesh Guest

    please tell how to make exiplicit includetion for flaoting point
     
    venkatesh, Dec 14, 2005
    #7
  8. venkatesh

    Jordan Abel Guest

    On 2005-12-14, venkatesh <> 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.
     
    Jordan Abel, Dec 14, 2005
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ben
    Replies:
    4
    Views:
    622
    Martin Ambuhl
    Jun 26, 2004
  2. whatluo

    (void) printf vs printf

    whatluo, May 26, 2005, in forum: C Programming
    Replies:
    29
    Views:
    1,249
  3. azza

    printf affects following printf/s

    azza, Oct 17, 2010, in forum: C Programming
    Replies:
    0
    Views:
    433
  4. Saraswati lakki
    Replies:
    0
    Views:
    1,342
    Saraswati lakki
    Jan 6, 2012
  5. guru
    Replies:
    8
    Views:
    284
Loading...

Share This Page