I am trying to store list of files in a char** variable.
scandir() finishes properly but I get a segmentation fault when trying to print the char**.
Here\'s the co
I am not sure this is the problem, but you have to allocate another byte for the null termination:
*fileList[i] = (char*)malloc(strlen(fileListTemp[i] -> d_name + 1) *sizeof(char));