reverse atoi()

This is a discussion on reverse atoi() within the C++ Programming forums, part of the General Programming Boards category; is there a simple way to reverse the effects of atoi()? I'm trying to build a debug system.. and i ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    403

    reverse atoi()

    is there a simple way to reverse the effects of atoi()? I'm trying to build a debug system.. and i need to output the line number from the file which comes in integer format.

  2. #2
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Yep, itoa.

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    403

    is that ANSI?

    i can't find that one in my book

  4. #4
    Registered User
    Join Date
    Feb 2002
    Posts
    591
    Should be in stdlib.h

  5. #5
    Registered User
    Join Date
    Aug 2001
    Posts
    403

    funny how i never used that before..

    2 years w/ c++ (more with C) and i've never needed to use this.. i thought i'd exhausted most of cstdlib

    [edit]nevermind, it isn't ansi.. i just checked the compatibility[/edit]
    Last edited by cozman; 04-29-2002 at 04:01 PM.

  6. #6
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    If you want it to be ANSI and itoa isn't ANSI, then why not use sprintf? or write your own?!

    U.
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Having trouble with atoi
    By NewbGuy in forum C Programming
    Replies: 2
    Last Post: 05-23-2009, 12:55 AM
  2. Problem with my reverse function and its output!
    By Matus in forum C Programming
    Replies: 4
    Last Post: 04-29-2008, 09:33 PM
  3. Using reverse iterators in algorithms
    By 0rion in forum C++ Programming
    Replies: 1
    Last Post: 02-27-2006, 03:19 AM
  4. gethostbyaddr() reverse lookups failing (???)
    By Uncle Rico in forum C Programming
    Replies: 9
    Last Post: 08-19-2005, 10:22 AM
  5. Replies: 7
    Last Post: 03-18-2003, 03:32 PM

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