is perfect in this case, however there are other functions which you may find usefull in the future for similar tasks
- "string to long"
- "string to unsigned long"
- "string to double"
These functions take a
parameter which on return holds the position that the new string pointer after the number processed. This is helpful if you have a number in a string.
take the radix as an additional parameter to specify the number base of the string so you can convert binary, octal, decimal, hexadecimal or any other base string to its integer equivalent
check out their pages on MSDN: atoi