Use atoi
and atof
for numeric conversions.
int foo = atoi( "27" ); int bar = atof( "93.1" );
There's also this monster of a function called sscanf
that is
sort of a reverse of sprintf
but I don't think I've actually seen
it used in real code before.