File manipulation and arrays

Joe Duval - Entomology duvalj at bionette.cgrb.orst.edu
Fri Aug 10 07:03:42 AEST 1990


Hi,
  I need to read in some data from a file.  Preferably into an array of
pointers to char.  Then switch the data around and write it back out to the
same file.

Some questions:
I want to have the array to have a dynamic length ie: *array [LINES_IN_FILE]].
BUT, i want this to work for any size file (up to a point) and won't
know the number of LINES until run-time.  How should I declare this?
Should I just use a maximum number for LINES_IN_FILE?

Will fputs() overwrite the old data in the file?

Thanks

-Joe

--
Joe Duval		duvalj at bionette.cgrb.orst.edu
Looking for 62-64 Chevy Nova body parts.  I've got a 63 Nova SS forsale.



More information about the Comp.lang.c mailing list