Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Reading data file into 2D array (http://www.go4expert.com/forums/reading-data-file-2d-array-t25172/)

Rangerbob86 7Mar2011 11:41

Reading data file into 2D array
 
Basically I have a data file that has "slides" on it. They are layed out like this:

1
. . . . . . . . . . . . . . . . . 1
. .
. .
. .
. THE BEGINNING
. .
. .
. .
. .
. . . . . . . . . . . . . . . . . .

The first line only contains a number, which I can store to some variable. The next 10 lines (each with 36 characters) are supposed to represent a slide (the spacing appears off in the post but is correct in the compiler). I am trying to store each individual character into the array char image [10][36]. There are 14 of these slides in the data file that I need to store in 14 separate 2d arrays. I'm not very familiar with using data files as it is, so am confused as to what the best way to do this would be. Any help is appreciated. Thanks!


All times are GMT +5.5. The time now is 13:08.