TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JERRY COFFIN
from: CLIFF RHODES
date: 1997-08-06 08:31:00
subject: Sunir ventures into C++

--> Jerry Coffin wrote to Daniel Jones <--
JC>On (02 Aug 97) Daniel Jones wrote to Aare Tali...
JC> 
JC> DJ> Please sketch me a class definition for an I/O stream which
JC> DJ> doesn't use references and allows this:
JC> 
JC> DJ> cout << "I have " << Number << " apples.";
JC> 
JC>I don't think this is the example you intended you use - if you try
JC>to do it, you'll find that while efficiency might be less than
JC>ideal (if `Number' is of some relatively large, complex type) but
JC>it's relatively easy and straightforward to code.
I missed the first part of this so maybe I am missing the point, but I 
don't see how you can do this without a reference to the ostream. How 
can you catenate << operators on a stream like this without returning 
a reference to the ostream?
If it is easy, could you show an example? Off hand, I can't think of a 
way to do it.
Cliff Rhodes
cliff.rhodes@juge.com
crhodes@flash.net
X CMPQwk 1.42 1692 X"Laws undertake to punish only overt acts." - Montesquieu
--- Maximus/2 3.01
---------------
* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000)

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