I have to read text file line by line to multidimensional array. I have this code:
char *data;
data = (char*)malloc(size_d);
while(fgets(data, size_d, fp) != NULL)
{
printf("[%d] %s ", strlen(data), data);
}
I want to put every line to char array. Some suggestions?