Thread: compiler problems

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    14

    compiler problems

    using borland turbo c 2.01.
    I am currently checking and amending a program. When i step thru the program all goes well till i reach a line of code thus
    batch.cre.cust_bal = atof(str)
    whereupon the terminates thus
    scanf : floating point formats not linked
    abnormal program termination
    I have the header file for the function atof.
    the program should read a text file, just before the offending line i read the string using fgets to place into 'str' putting a watch on 'str' the correct data goes into 'str' but upon the next line ........
    any thoughts.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Stop using a stone-age compiler for one thing

    Back in the days of yore, when processors didn't have math coprocessors, all the floating point code was done in software.

    To save space in the executable (because that's a good thing from the marketroids), the floating point library is usually omitted. But the compiler is supposed to auto detect your use of floating point, and include the library.

    Problem is, its a broken algorithm.

    The alleged fix is to say something like
    double dummy_cos_my_compiler_is_lame = 1.0;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. lcc win32 compiler download problems
    By GanglyLamb in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 08-01-2004, 07:39 PM
  3. Compiler Design... Anyone That Can Help!
    By ComputerNerd888 in forum C++ Programming
    Replies: 3
    Last Post: 09-27-2003, 09:48 AM
  4. Comile problem using latest Dev C++ Compiler
    By shiny_dico_ball in forum C++ Programming
    Replies: 6
    Last Post: 06-06-2003, 05:32 PM
  5. C compiler help . .
    By hermit in forum C Programming
    Replies: 13
    Last Post: 05-10-2002, 08:41 PM