Converting a string
to an integer with the atoi()
function is easy, is not it?
However, when I use the atoi()
function to convert a character to an integer, the program that is at runtime simply crashes.
What would be the best way to transform a character (eg '1') into an integer (ex: 1)?