TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: ALL
from: JAMIE KOWINSKY
date: 1997-11-28 21:42:00
subject: Reading to the end of file

What is the prefered loop for reading to the end of a file?
while (!filestream.eof())
or
while (!filestream.fail())
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.
As alway, any info would be greatly apperaciated.
thanks!
-Jamie
... Pentiums melt in your PC, not in your hand.
--- FMail/386 1.02
---------------
* Origin: KastlerocK + Jeannette, PA + 412.527.3749 (1:129/230)

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™.