I want to read a datafile which consits of 5 coloums and 4 rows, which consists of numbers seperated by commas.
The first line of the data file looks like this: 103343, 24, 55, 24,12.
I have started my program by allowing to input the file in my program, however i dont know how i can read it.
My program at the moment looks like:
FILE *my_in; int count=0; my_in= fopen("C:\\datafile.txt", "rt"); // read only if(my_in==NULL) printf("\nError opening input file, program exiting\n"); printf("\nType a number & press the enter key to finish"); scanf("%d",&count); return(1); /* program aborts returning 1 to operating system */ } }