TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: DARIN MCBRIDE
from: JERRY COFFIN
date: 1997-03-19 11:31:00
subject: Help with Classes

On (18 Mar 97) Darin McBride wrote to Jerry Coffin...
 JC> Now, for how I'd do this instead:
 JC> class PlayerInfo    // Note that `class' canNOT be capitalized.
 JC> {
 JC> public:             // And neither can `public' or `private'
 JC>     virtual void show_status(ostream &stream) {
 JC>         cout << "Hit Points: " << itsHitPoint << endl;
 JC>     }
 DM> So, remind me... why did you pass in the ostream&?  :-}
Geeze - I should quit posting for a couple of days until I can manage to
learn to type what I mean to again.  I've never been the best at it, but
I seem to be getting a lot worse lately...
Obviously, the "cout" should be replaced with "stream"...
    Later,
    Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)

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