Thread: converting a string of numbers into an integer value -How?

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    8

    Unhappy converting a string of numbers into an integer value -How?

    How can i convert string = "9"; to and int val = 9;? I used to use Blitz basic and i remember a function called Int that does this, so is there one in C++ or should i writ my own?

  2. #2
    Registered User
    Join Date
    Oct 2002
    Posts
    291
    You should look into atoi

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 04-25-2008, 02:45 PM
  2. Logical errors with seach function
    By Taka in forum C Programming
    Replies: 4
    Last Post: 09-18-2006, 05:20 AM
  3. Calculator + LinkedList
    By maro009 in forum C++ Programming
    Replies: 20
    Last Post: 05-17-2005, 12:56 PM
  4. Another overloading "<<" problem
    By alphaoide in forum C++ Programming
    Replies: 18
    Last Post: 09-30-2003, 10:32 AM
  5. Converting a string to an integer
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 08-31-2001, 10:01 PM