implicit declaration of function ‘strtok_r’ [-Wimplicit-function-declaration] inspite including <string.h>
I have the following code to tokenize a string containing lines separated by \n and each line has integers separated by a \t : void string_to_int_array(char file_contents[BUFFER_SIZE << 5], int array[200][51]) { char *saveptr1, *saveptr2; char *str1, *str2; char delimiter1[2] = "\n"; char delimiter2[2] = " "; char line[200]; char integer[200]; int j; for(j = 1, str1 = file_contents; ; j++, str1 = NULL) { line = strtok_r(str1, delimiter1, &saveptr1); if (line == NULL) { break; } for (str2 = line; ; str2 = NULL) { integer = strtok_r(str2, delimiter2, &saveptr2); if (integer == NULL) { break; } }