On (02 Aug 97) Daniel Jones wrote to Aare Tali...
DJ> Please sketch me a class definition for an I/O stream which
DJ> doesn't use references and allows this:
DJ> cout << "I have " << Number << " apples.";
I don't think this is the example you intended you use - if you try to
do it, you'll find that while efficiency might be less than ideal (if
`Number' is of some relatively large, complex type) but it's relatively
easy and straightforward to code. However, doing input like this:
cout << "PLease enter the number of apples: " << flush;
cin >> Number;
is an entirely different story. Doing this without a reference is quite
difficult indeed.
Later,
Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)
|