Download C++: A Beginner`s Guide, Second Edition

Transcript
use a reference parameter, the C++ compiler automatically knows that it is an address and dereferences
it for you. In fact, using the * would be an error.
Since i has been declared as a reference parameter, the compiler will automatically pass f( ) the address
of any argument it is called with. Thus, in main( ), the statement
6
C++ A Beginner’s Guide by Herbert Schildt