13. March 2012 08:00
This function should probably be avoid since it does not have any error handling and the strtol should be used instead. However it is a quick and dirrty way of converting strings to int's
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
char *str = "12345";
int val = atoi(str);
printf("%s -> %d\n", str, val);
return 0;
}
b9abd1b4-5340-4191-8692-fd325781b65b|0|.0