hi,
u don't have a built-in library function for itoa in gcc in redhat Linux. so u will surely get this undefined reference to itoa error.
if u want to get rid od this error then u have to write a function called itoain the same program.
if u want a itoa converter program i can send it to u or just apply the logic given by Mr.Gavin to get the result.
regards,
Sri
Main Topics
Browse All Topics





by: newmangPosted on 2001-07-11 at 21:01:28ID: 6275650
I may be getting old and forgetful (According to my kids I am) but I can't recall an itoa function. atoi, atol etc I do use but not itoa. The gcc compiler on linux and cc compiler on Solaris don't have any reference to these functions either.
You can achieve the required result for base 8, 10 & 16 using the sprintf function but for the others you'll probably have to do it manually by repeated divisions by the base number.
Cheers - Gavin