Reading from a txt file into a two dimension array in C
I'm trying to read from a txt file into a two dimension array. The text file contains following data.
Code:
0 0 0 1 0 0 1 0 1 0 0 1 Can anyone give me a hint on how to do this? Thanks |
my code looks something
Code:
if (fp == NULL) exit(EXIT_FAILURE); |
something like this
Code:
man fopen |
I used fscanf to solve the problem...
Problem solved!! |
All times are GMT -5. The time now is 10:18 PM. |