Possible Duplicate:
Converting string to integer C
I wanted to convert a number I received from the command argv[1] into an "int". I know the argv is stored as a string, but how can I get an integer value from them. Supposing argv[1] = 10.
You can use the atoi()
function from the C standard library: