Forum Discussion
Altera_Forum
Honored Contributor
16 years agoconverting integers to strings and vice versa
I have an integer, 255, that I would like to convert to the string "255" for file IO. Any idea how I can do this? Thanks, Andrew
Altera_Forum
Honored Contributor
16 years agosprintf() is the more standard way to do this. If you want something light weight use a loop and %10 and /10 operations to pluck out the characters (I'm pretty sure that's how itoa() works).