Re: Reading a table



On Nov 26, 2:10 pm, user923005 <dcor...@xxxxxxxxx> wrote:
On Nov 26, 11:04 am, Stephen.Schoenber...@xxxxxxxxx wrote:

Hello,

My C is a bit rusty (.NET programmer normally but need to do this in
C) and I need to read in a text file that is setup as a table. The
general form of the file is

00000000 USNIST00Z 00000000_00 0 000 000 000 0000 000

I need to read the file line by line and eventually parse out each
piece of the file and store in arrays that correspond to the specific
line. array1[1] would be the first entry in the first line and so on
and so forth.

Any suggestions would be great!

fopen() to open the file.
fgets() to read in one line at a time.
write your own function to parse it, because only you know the format.

HTH

Thanks!
.