itoa()
is not defined in ANSI-C and is also not part of C++, but is supported by some compilers. It is however not advisable to use it in your code even if it is being supported by your compiler.The better solution is to use
sprintf()
.Replace,
itoa (number, buffer, radix)
with sprintf (buffer, "%d", number);