"1234" ==> 1234 (char * ==> int)

Henry Spencer henry at zoo.toronto.edu
Thu Dec 13 15:47:26 AEST 1990


In article <1990Dec12.215359.5378 at cs.utk.edu> lape at .cs.utk.edu (Bryon S. Lape) writes:
>	I need to know how to convert a string of numbers into an int.
>For example, "1234" ==> 1234...

Use the atoi() or atol() function from the C library.
-- 
"The average pointer, statistically,    |Henry Spencer at U of Toronto Zoology
points somewhere in X." -Hugh Redelmeier| henry at zoo.toronto.edu   utzoo!henry



More information about the Comp.lang.c mailing list