c str add int code example
Example 1: string to int c
atoi(str) is unsafe
This is the prefered method:
(int)strtol(str, (char **)NULL, 10)
Example 2: c str add int
char buf[12];
snprintf(buf, 12, "FPS: %d", framesCount);
atoi(str) is unsafe
This is the prefered method:
(int)strtol(str, (char **)NULL, 10)
char buf[12];
snprintf(buf, 12, "FPS: %d", framesCount);