Hi Michael,
I should say that I have rejected C++ as offering me any benefit over
standard C.
> Is it just me who's having a hell of a time thinking this through or is
> this some sort of exception in the design of the language whereby a '&'
> character can be used to get the compiler to automagically work out all
> the pointer stuff? :-]
The idea of this is just to make the code look cleaner. AFAICS, it has no
value except aesthetic.
eg.
int funca( int &x)
{
x = 2;
return(0);
}
is exactly equivalent to:
int funcb( int *x)
{
*x = 2;
return(0);
}
It also makes calling the function look nicer too:
funca( var);
funcb( &var);
John.
--- JetMail 0.99beta23
---------------
* Origin: The Dysfunctional Refrigerator (fidonet 2:2502/60)
|