String to float

This is a discussion on String to float within the C Programming forums, part of the General Programming Boards category; Hello, I'm taking in a string value "$333". I need to chop of the $ and convert the 333 to ...

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    3

    String to float

    Hello,
    I'm taking in a string value "$333".
    I need to chop of the $ and convert the 333
    to a float value. It will be standard input.
    thank you for any advice on completing this task.
    Last edited by cman9999; 03-03-2003 at 01:43 AM.

  2. #2
    Registered User Vber's Avatar
    Join Date
    Nov 2002
    Posts
    807
    Use the atof() function

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OOP Question DB Access Wrapper Classes
    By digioz in forum C# Programming
    Replies: 2
    Last Post: 09-07-2008, 05:30 PM
  2. C++ ini file reader problems
    By guitarist809 in forum C++ Programming
    Replies: 7
    Last Post: 09-04-2008, 07:02 AM
  3. Inheritance Hierarchy for a Package class
    By twickre in forum C++ Programming
    Replies: 7
    Last Post: 12-08-2007, 04:13 PM
  4. Something is wrong with this menu...
    By DarkViper in forum Windows Programming
    Replies: 2
    Last Post: 12-14-2002, 11:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21