On Tue, Jul 27, 2004 at 12:33:33PM +0800, Rebs Guarina wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > hi guys, > > is there an equivalent for the function itoa (which converts an integer > to string) in gcc?
snprintf(str, length, "%d", integer); should do the trick. Make sure that you give snprintf the right length, to prevent buffer overflows, which itoa is notoriously vulnerable to. -- dido Sans les mathematiques on ne penetre point au fond de la philosophie. Sans la philosophie on ne penetre point au fond des mathematiques. Sans les deux on ne penetre au fond de rien. -- Philippine Linux Users' Group (PLUG) Mailing List [EMAIL PROTECTED] (#PLUG @ irc.free.net.ph) Official Website: http://plug.linux.org.ph Searchable Archives: http://marc.free.net.ph . To leave, go to http://lists.q-linux.com/mailman/listinfo/plug . Are you a Linux newbie? To join the newbie list, go to http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie
