TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: KEN WAUGH
from: BALOG PAL
date: 1997-07-20 11:45:00
subject: Sunir ventures into C++

                               Hi, Ken Waugh!
On 18 Jul 97  18:48:09 you wrote to Sunir Shah
 SS> I hate five major things about C++ so far:
 SS> /* 1. Passing by reference */
 SS> void foo( int& HeyIMagicallyAlterYourVariableWithoutTellingYou )
 SS> {
 KW> You aren't gonna like this one bit then... What you mention above pass
 KW> by  reference, I posted a C example of it happening just this week. C
 KW> does it  also. Check out the Pointer cheat sheet I posted it gives you
 KW> all the  possibilites.
C does _not_ have pass by ref. Messing around with pointers and addresses ar
not near that.
Try it: write a funftion that take something by value. Then write a program
that calls that function in zillion places. Now try to change the function to
take the same object by ref.  In C++ you add an & to the prototype and
another one in the function header. In C you will have tor rearranege each
call, and maybe rewrite complete sections of the program.
Paul
... Death is nature's way of saying, 'Slow down.'
--- OS/2 Warp
---------------
* Origin: The FlintStones' Cave in BedRock (2:371/20)

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