Help With Converting Char to Int

It happens when i try and upload it. then it highlights this line

pos = atoi(xVal);