TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: DARIN MCBRIDE
from: THOMAS MAEDER
date: 1997-12-10 08:25:00
subject: Parsing a file

DM> No, you don't need to create your own class.  Just have a friend to
DM> is the overloaded operator>>.
DM>  TM> iostream &operator>>(iostream &ias, Person &aPerson)
DM>  TM>                 ...
DM>  TM> }
DM> There ya go - that's all that's needed.
DM> If it comes in from a string, a file, a modem, whatever, this will r
DM> strings.  However, his example was much more complicated than this,
DM> some parsing of quotes and commas.
Which is exactly why I suggested creating a class.
Thomas
---
 þ MM 1.0 #0113 þ DisneyWorld: A people trap operated by a mouse.
---------------
* Origin: McMeier & Son BBS (2:301/138)

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