Xref: utzoo comp.lang.c:32900 comp.lang.c++:9983 comp.os.msdos.misc:461 Path: utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!netnews.upenn.edu!vax1.cc.lehigh.edu!lehigh.bitnet!AHB3 From: AHB3@Lehigh Newsgroups: comp.lang.c,comp.lang.c++,comp.os.msdos.misc Subject: RE: scanf() problem in Turbo C++ 1.00 but NOisc Message-ID: <15109018:58:51AHB3@lehigh.bitnet> Date: 15 Oct 90 23:58:51 GMT Lines: 14 To: lusysnz@VAX1.CC.LEHIGH.EDU X-Envelope-to: lusysnz The problem is a bug. Pure and simple. I have heard that Turbo C 1.0 had the same problem. What is happening is the compiler doesn't realize that the variable being passed in is a floating point number, so it don't link in the floating point routines to scanf. When you uncomment the first scanf line, the compiler links the floating point routines into scanf. If you didn't know, the compiler doesn't know that the scanf routine will try to print a floating point number. Only scanf knows. The format string used by scanf is just a string to the compiler. Therefore, until they fix the bug (again), people will have to use temporary variables for floats and doubles. Arthur H. Boyd Lehigh U.