aside from itoa function, is there any other way to convert a string to an integer? itoa function won't work in my compiler.

itoa is not an ANSI/ISO standard function and is non-portable, also it converts an integer to a string not a string to an integer.

Try atoi or strtol

thank you, I'll try that