www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/01/11:15:24

From: Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p>
Newsgroups: comp.os.msdos.djgpp,comp.lang.c
Subject: Re: Acquiring data from files
Organization: Pin Eight Software http://pineight.8m.com/
Message-ID: <i62slsk6hvu5bctuoi3findv5e5nqslb21@4ax.com>
References: <8jko0m$qrb$1 AT pegasus DOT tiscalinet DOT it>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Lines: 27
X-Trace: /K49oE0Qdx1W/WesAu2HlGW3hJTPIZO4kPOv6epxgupqpC4KWZkZ6tEE0RHmbKoXToeFbftViobf!F8zxLawZ+mYo8l37aD3c5uiCwwHjTJZjDzQlQ6t4382qtc7KNYmRMXyPzAi91amxp516kxXPQFjG!UlQ=
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Sat, 01 Jul 2000 15:07:44 GMT
Distribution: world
Date: Sat, 01 Jul 2000 15:07:44 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Sat, 1 Jul 2000 14:26:42 +0200, "godsofmetal"
<godsofmetal AT tiscalinet DOT it> wrote:

>Does anybody know how to acquire data from a file and how to store them in
>arrays.
>For istance, suppose we got two columns of data in a file *.* :
>
>COL1        COL2
>
>Mike          24
>George     12
>Felipe        67
>Timo          36
>Mika          29
>
>Is it possible to put the content of each col. in a string and in an array?

This can be done with fgets() to read lines of data and sscanf() to
interpret them.  For more information, ask comp.lang.c (added).

-- 
Damian Yerrick
"I refuse to listen to those who refuse to listen to reason."
See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html

This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses.  http://www.mcafee.com/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019