MM> Is it just me who's having a hell of a time thinking this through or
MM> is this some sort of exception in the design of the language whereby
MM> a '&' character can be used to get the compiler to automagically work
MM> out all the pointer stuff? :-]
Believe it or not, it's the latter. Pass-by-reference arguments to functions
are implemented in most, if not all, compilers by passing pointers to the
relevant variables behind the scenes, and translating
var1 = 1 ;
in the body of the function into, effectively,
*pointer_to_referred_var1 = 1 ;
where `pointer_to_referred_var1' is what was actually passed, under the
covers, as the reference parameter.
¯ JdeBP ®
--- FleetStreet 1.19 NR
---------------
* Origin: JdeBP's point, using Squish (2:440/4.3)
|