Re: read multiple lines of a file
- From: Barry Schwarz <schwarzb@xxxxxxxxx>
- Date: Mon, 30 May 2005 15:56:32 -0700
On Mon, 30 May 2005 16:50:49 +0000 (UTC),
chitlesh@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx (Clunixchit) wrote:
>How can i read lines of a file and place each line read in an array?
>for exemple;
>array[0]=line1
>array[1]=line2
Your use of the word line implies a text file. fgets() is frequently
the tool of choice.
If the file is not a text file, then fread() would probably be better.
<<Remove the del for email>>
.
- References:
- read multiple lines of a file
- From: Clunixchit
- read multiple lines of a file
- Prev by Date: Re: how to define a function pointer variable witout typdef?
- Next by Date: Re: sscanf and int64 in Win32 and Unix - different results?
- Previous by thread: read multiple lines of a file
- Next by thread: Re: a question about ftell function
- Index(es):
Relevant Pages
|