DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Matt Lenzini Guest

    Inputting floating point number


    I am new to c and need to input a floating point number into a program. I
    have declared a variable
    as a float and have tried to input a value but keep getting floating point
    overflow?



  2. #2
    Danny Kalev Guest

    Re: Inputting floating point number

    Matt,

    Can you please post some code that shows what you're trying to do? My
    guess is that you forgot to put an ampersand before the variable's name
    in a scanf() call. But I'm only guessing.

    Danny Kalev

    http://www.amazon.com/exec/obidos/ASIN/0789720221

    Please reply to the newsgroup.



    Matt Lenzini wrote:
    >
    > I am new to c and need to input a floating point number into a program. I
    > have declared a variable
    > as a float and have tried to input a value but keep getting floating point
    > overflow?


  3. #3
    Stephen O Callaghan Guest

    Re: Inputting floating point number


    "Matt Lenzini" <lenzinml@yahoo.com> wrote:
    >
    >I am new to c and need to input a floating point number into a program.

    I
    >have declared a variable
    >as a float and have tried to input a value but keep getting floating point
    >overflow?
    >
    >

    Are you scanning for a float?

    If you put the piece of code causing the problem on the bulletin
    board it might be apparent at a glance(then again maybe not).



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links