TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JAMIE KOWINSKY
from: JEAN-FRANCOIS GOBIN
date: 1997-12-13 13:04:00
subject: Reading to the end of file

Hello Jamie ...
 > while (!filestream.eof())
Test the end of file.
 > or
 > while (!filestream.fail())
Test any error encountered during filestream access.
 > What is the major difference between the fail() and eof() test?
 > should I perhaps || them together?
 > I experemented with reading a text file and both seamed to give
 > the same results.
No. the !filestream.fail() normally performed one more loop.
                                             ùPouceù
-* Champlon (Belgique) ... Perdu au milieu de la Foret !
--- FMail 1.0g
---------------
* Origin: Alenia BBS Fidonet Conference (2:293/3212.83)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.