Thread: char number to same int number

  1. #1

    char number to same int number

    What's the function that allows you to convert a number in a character or string into an integer? What library is it in?

    char foo = '2';
    int footoo = function(foo);

  2. #2
    Registered User The Dog's Avatar
    Join Date
    May 2002
    Cape Town
    I think you are looking for atoi(), declared in stdlib.h.

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Visalia, CA, USA
    I think that message board you were looking for was the faq

  4. #4
    I think you should go **** yourself and your dog while you're at it.
    Thanks, "The Dog".

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    >I think you should go **** yourself and your dog while you're at it.
    I think you should be more polite to those who are trying to help you. You'll note that if you had done any research you would have found the information on your own very quickly. If you want your questions to keep getting answered then you would do well to be thankful for what you get.

    My best code is written with the delete key.

  6. #6
    Green Member Cshot's Avatar
    Join Date
    Jun 2002
    That's the beauty of unregistered posts
    You don't have to be polite.

  7. #7
    Registered User
    Join Date
    Apr 2002
    Prelude and Cshot,

    This individual is obviously an ill-mannered boor and it's beneath the dignity of both of you to waste your time.

    "When the only tool you own is a hammer, every problem begins to resemble a nail." Abraham Maslow

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C problem with legacy code
    By andy_baptiste in forum C Programming
    Replies: 4
    Last Post: 05-19-2008, 06:14 AM
  2. Replies: 1
    Last Post: 10-27-2006, 01:21 PM
  3. Replies: 2
    Last Post: 03-24-2006, 07:36 PM
  4. Need help understanding info in a header file
    By hicpics in forum C Programming
    Replies: 8
    Last Post: 12-02-2005, 11:36 AM
  5. getting a headache
    By sreetvert83 in forum C++ Programming
    Replies: 41
    Last Post: 09-30-2005, 05:20 AM