I am trying to read a CSV file of the following format:
5,455,78,5
12245,4,78
1,455,4557,1,8,9
I have managed to open the file but I have no idea how to interpret the data. All the data is written in the first column, but I do not know how many rows there are or how many entries there is in each row. This is my code for opening the file.
printf("File chosen is: %s", file);
int p = 0;
FILE *myFile = NULL;
myFile = fopen(file, "r");
if (myFile == NULL)
{
exit(1);
}
if (myFile != NULL)
{
printf("\n\nFile read successfully");
}