🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.deployment
Article #11

Re: read and write text file

#11
From: Ed Mulroy [TeamB]
Date: Thu, 24 Mar 2005 03:32
15 lines
1333 bytes
FYI:

That code does not have anything to check if the returned FILE * value 
is NULL.  You really should test it before using it.

.  Ed

> didan wrote in message
> news:4241e36f$1@newsgroups.borland.com...
>
> here is the code
> fPtr = fopen(fileName,"r")
> fscanf(fPtr,"%f", &data)
>
> is there any better way to read a file?
Technical Details
Message-ID: <424234e6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <424048bf$1@newsgroups.borland.com> <424055d3$1@newsgroups.borland.com> <m2br9b73jb.fsf@madbox2.local> <4241e36f$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f8e54,bc0af2e7537b6788
X-Google-Attributes: gidf8e54,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Ed Mulroy [TeamB]" <dont_email_me@invalid.com>
Newsgroups: borland.public.cppbuilder.deployment
References: <424048bf$1@newsgroups.borland.com> <424055d3$1@newsgroups.borland.com> <m2br9b73jb.fsf@madbox2.local> <4241e36f$1@newsgroups.borland.com>
Subject: Re: read and write text file
Date: Wed, 23 Mar 2005 22:32:54 -0500
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 69.134.170.196
Message-ID: <424234e6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1111635174 69.134.170.196 (23 Mar 2005 19:32:54 -0800)
X-Authenticated-User: edmulroy
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail