Coding Help C, Text file into 2d array.
I am stuck in the C programming and would like if someone could help. I need to take the data from a .txt file and store it in a 2d array. I can read the data and store it like this.
If you could show me an example of how I can store this in 2d array it'll be greatly appreciated. Thanks
FILE* inFile = NULL;
char Arr[1000];
inFile = fopen("myfile.txt", "r");
while(1){
fgets(Arr, 1000, inFile);
printf("%s", Arr);
if(feof(inFile))
break;
}
If you could show me an example of how I can store this in 2d array it'll be greatly appreciated. Thanks
FILE* inFile = NULL;
char Arr[1000];
inFile = fopen("myfile.txt", "r");
while(1){
fgets(Arr, 1000, inFile);
printf("%s", Arr);
if(feof(inFile))
break;
}