Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

string to int c

atoi(str) is unsafe

This is the prefered method:
(int)strtol(str, (char **)NULL, 10)
 
PREVIOUS NEXT
Tagged: #string #int
ADD COMMENT
Topic
Name
2+6 =