Article View: be.comp.programming
Article #3181structuren inlezen en wegschrijven (in c)
From: biffi
Date: Sat, 14 Feb 2004 14:51
Date: Sat, 14 Feb 2004 14:51
23 lines
1468 bytes
1468 bytes
ik heb eens een vraagje over de taal c,(beginner)
hoe kan je van een bepaald txt bestand een structuur inlezen als de
woorden gescheiden zijn door spaties ?
bv txt file is
telecom telenet antwerpen 120.0
elektronica ericsson brussel 123.0
.....
en de struct is:
typedef struct
{ float omzet;
char naam[LEN];
char plaats[LEN];
char spec[LEN];
} Bedrijf;
dus telecom moet in spec[LEN] komen, telenet in naam[LEN] enzo ...
alvast bedankt,
Biffi.
Technical Details
Message-ID:
<b6ds20hp66vcre9cbrq9fseo9k452022fp@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.vmunix.org!aotearoa.belnet.be!news.belnet.be!ossa.telenet-ops.be!hestia.telenet-ops.be.POSTED!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit X-Google-Thread: fcea4,d07525d78edd6b7f,start X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2004-02-14 06:51:58 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.vmunix.org!aotearoa.belnet.be!news.belnet.be!ossa.telenet-ops.be!hestia.telenet-ops.be.POSTED!not-for-mail From: biffi <biffi1984@hotmail.com> Newsgroups: be.comp.programming Subject: structuren inlezen en wegschrijven (in c) Message-ID: <b6ds20hp66vcre9cbrq9fseo9k452022fp@4ax.com> X-Newsreader: Forte Agent 1.93/32.576 Nederlands MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 23 Date: Sat, 14 Feb 2004 14:51:58 GMT NNTP-Posting-Host: 213.224.82.128 X-Complaints-To: abuse@telenet.be X-Trace: hestia.telenet-ops.be 1076770318 213.224.82.128 (Sat, 14 Feb 2004 15:51:58 CET) NNTP-Posting-Date: Sat, 14 Feb 2004 15:51:58 CET Organization: Telenet Internet