July 22nd, 2003, 03:01 PM
converting integer to a string
what are the functions used for converting an integer to a string?
thanks in advance
July 22nd, 2003, 03:13 PM
i remember using itoa(integer,string,base) to do this once.
use 10 ast the base if you're dealing with standard decimal numbers.
July 22nd, 2003, 03:27 PM
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
July 22nd, 2003, 03:42 PM
itoa is not part of the ANSI standard and is only supported by some compilers. sprintf is a much more portable solution.
July 22nd, 2003, 04:10 PM
Or wsprintf (if you're using windows)
int num = 10;
wsprintf(chstr, "%d", num);
July 22nd, 2003, 04:45 PM