use FILE and associated functions in stdio.h. First call fopen() to open the file, then in a loop call fgets() to read each line. After end-of-file is reaches call fclose() to close the file.
If you use an array of char pointers as you posted you will want to call malloc() to allocate memory for the pointer before copying the line into the array.
Last edited by Ancient Dragon; Apr 26th, 2007 at 7:35 am.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Offline 21,953 posts
since Aug 2005